Opened 3 years ago

Closed 2 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


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 Changed 3 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization

comment:2 Changed 2 years ago by olethanh

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 Changed 2 years ago by claudep

  • Resolution set to wontfix
  • Status changed from new to closed

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