Opened 11 years ago

Closed 10 years ago

#20798 closed Cleanup/optimization (wontfix)

create_template_postgis should use -e shell parameter

Reported by: Mitar Owned by: nobody
Component: GIS Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

create_template_postgis scripts should use #!/bin/bash -e as hashbang so that the script fails if any of the commands fails. This is useful for automation (like Travis CI installation of PostGIS).

Change History (3)

comment:1 by Claude Paroz, 11 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 by Olivier Le Thanh Duong, 10 years ago

After looking into it I'm not sure if it's such a good idea, because the script don't clean after itself in case of failure.
For example if a user doesn't have postgis installed, the first time the script run it will create the database template_postgis then fail to install the postgis extension in it. Then the user install postgis but the script will directly fail in subsequents runs since template_postgis will already exists. So this isn't really user friendly.

comment:3 by Claude Paroz, 10 years ago

Resolution: wontfix
Status: newclosed

Thanks for looking. Considering that this script is not used any more with Postgis 2, and the minor effect it has, I suggest to "won't fix" the issue.

Note: See TracTickets for help on using tickets.
Back to Top