Control: reassign -1 dbconfig-common
Control: found -1 1.8.52
Control: affects -1 bandwidthd-pgsql

Looks like this issue is very much introduced by dbconfig-common
not properly handling running from scripts that use 'set -e'
anymore. I'm thus reassigning it as instructed...

On Mon, Jun 29, 2015 at 10:13:20AM +0200, Andreas Henriksson wrote:
[...]
> > So if you receive bugs against your package, and you believe that they
> > may be caused by dbconfig-common instead of your own package, don't
> > hesitate to reassign the bugs quickly.             
[...]

Quickly looked at the problem and spotted an issue when running
under 'set -e'. See attached patch.

With the patch applied to dbconfig-common, the installation
of bandwidthd-pgsql continues much further until it runs in to yet
another issue which I've not yet had time to investigate
(however it doesn't seem to be specific to anything the
bandwidthd-pgsql package does either):


+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z 1 ']'
+ '[' YES = YES ']'
++ dpkg-query --control-path ucf templates
+ db_x_loadtemplatefile /var/lib/dpkg/info/ucf.templates ucf
+ _db_cmd 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates' ucf
+ _db_internal_IFS='    
'
+ IFS=' '
+ printf '%s\n' 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates ucf'
+ IFS='         
'
+ IFS='
'
+ read -r _db_internal_line
+ RET='10 bandwidthd-pgsql/pgsql/method doesn'\''t exist'
+ case ${_db_internal_line%%[   ]*} in
+ return 10
dpkg: error processing package bandwidthd-pgsql (--configure):


Regards,
Andreas Henriksson
From: Andreas Henriksson <andr...@fatal.se>
Subject: dbconfig-common: fix unset app-user regression under 'set -e'

Fix regression introduced in commit d84a2fef1cdfe
"Logic to allow the user to provide the domain f..."
when running under 'set -e' with no app-user set.


diff --git a/dpkg/common b/dpkg/common
index 0edc3bb..14a17ba 100644
--- a/dpkg/common
+++ b/dpkg/common
@@ -409,7 +409,7 @@ dbc_read_package_debconf(){
                # get app user; since dbc 1.8.50 we allow the admin to provide
                # the domain for the grant call. Unfortunately at least MySQL allows
                # the app-user to contain an at, so we need to be careful.
-               db_get $dbc_package/db/app-user
+               db_get $dbc_package/db/app-user || RET=""
                dbc_dbuser=`echo "$RET" | sed 's/\(.*\)@\([^@]*\)/\1/'`
                tmp_dballow=`echo "$RET" | sed -e 's/^[^@]*$//' -e 's/.*@\([^@]*\)/\1/'`
                if [ $tmp_dballow ] ; then





Reply via email to