Преглед изворни кода

dpkg-maintscript-helper: fix debug output

Print all the arguments instead of only the first one as long messages
were cut over multiple lines, resulting in multiple parameters passed
to the function.

Reported-by: Maarten Bezemer <maarten.bezemer@gmail.com>
Raphaël Hertzog пре 14 година
родитељ
комит
1b2bd2da73
2 измењених фајлова са 6 додато и 5 уклоњено
  1. 1 0
      debian/changelog
  2. 5 5
      scripts/dpkg-maintscript-helper.sh

+ 1 - 0
debian/changelog

@@ -99,6 +99,7 @@ dpkg (1.16.2) UNRELEASED; urgency=low
     removing/renaming a conffile with a "~" suffix as "priorversion"
     parameter. Thanks to Sam Morris <sam@robots.org.uk> for the patch.
     Closes: #658854
+  * Fix debug output of dpkg-maintscript-helper. LP: #936340
 
   [ Jonathan Nieder ]
   * Bump po4a version in Build-Depends to 0.41, since earlier versions do

+ 5 - 5
scripts/dpkg-maintscript-helper.sh

@@ -47,9 +47,9 @@ rm_conffile() {
 	[ -n "$DPKG_MAINTSCRIPT_NAME" ] || \
 		error "environment variable DPKG_MAINTSCRIPT_NAME is required"
 
-	debug "Executing $0 rm_conffile in $DPKG_MAINTSCRIPT_NAME "\
+	debug "Executing $0 rm_conffile in $DPKG_MAINTSCRIPT_NAME" \
 	      "of $DPKG_MAINTSCRIPT_PACKAGE"
-	debug "CONFFILE=$CONFFILE PACKAGE=$PACKAGE "\
+	debug "CONFFILE=$CONFFILE PACKAGE=$PACKAGE" \
 	      "LASTVERSION=$LASTVERSION ACTION=$1 PARAM=$2"
 	case "$DPKG_MAINTSCRIPT_NAME" in
 	preinst)
@@ -150,9 +150,9 @@ mv_conffile() {
 	[ -n "$DPKG_MAINTSCRIPT_NAME" ] || \
 		error "environment variable DPKG_MAINTSCRIPT_NAME is required"
 
-	debug "Executing $0 mv_conffile in $DPKG_MAINTSCRIPT_NAME "\
+	debug "Executing $0 mv_conffile in $DPKG_MAINTSCRIPT_NAME" \
 	      "of $DPKG_MAINTSCRIPT_PACKAGE"
-	debug "CONFFILE=$OLDCONFFILE -> $NEWCONFFILE PACKAGE=$PACKAGE "\
+	debug "CONFFILE=$OLDCONFFILE -> $NEWCONFFILE PACKAGE=$PACKAGE" \
 	      "LASTVERSION=$LASTVERSION ACTION=$1 PARAM=$2"
 	case "$DPKG_MAINTSCRIPT_NAME" in
 	preinst)
@@ -219,7 +219,7 @@ abort_mv_conffile() {
 # Common functions
 debug() {
 	if [ -n "$DPKG_DEBUG" ]; then
-		echo "DEBUG: $PROGNAME: $1" >&2
+		echo "DEBUG: $PROGNAME: $*" >&2
 	fi
 }