[DRE-commits] [redmine] 14/15: debian/config: fix dbname handling

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Feb 14 14:32:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository redmine.

commit 5773598780bce1c6de6dbd214b0d10762bad414c
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sun Feb 14 12:02:50 2016 -0200

    debian/config: fix dbname handling
---
 debian/config | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/config b/debian/config
index 1375192..b20cc02 100644
--- a/debian/config
+++ b/debian/config
@@ -21,16 +21,18 @@ if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
     fi
 
     for inst in $current_instances; do
-      dbc_go redmine/instances/$inst "$@"
-
       # use redmine_${instance} as database name by default
       db_rc=0
-      dbc_get redmine/instances/$inst/dbname || db_rc=$?
-      if [ $db_rc -ne 0 -o -z "$RET" ]; then
-        dbc_set redmine/instances/$inst/dbname "redmine_${inst}"
+      db_get redmine/instances/$inst/dbname || db_rc=$?
+      if [ $db_rc -eq 0 -a -n "$RET" ]; then
+        dbc_dbname="$RET"
+      else
+        dbc_dbname="redmine_${inst}"
       fi
 
       # TODO handle language for initial db data
+
+      dbc_go redmine/instances/$inst "$@"
     done
 
     # determine which instances were removed and store in redmine/old-instances

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git



More information about the Pkg-ruby-extras-commits mailing list