The following commit has been merged in the master branch:
commit 0e4b6fb5b82b8228021d2c1dca646f2c2baf8e1b
Author: Raphaël Hertzog <[email protected]>
Date:   Fri Jul 26 00:59:08 2013 +0200

    dpkg-maintscript-helper: improve behaviour in “Multi-Arch: same” packages
    
    Improve dpkg-maintscript-helper to automatically add the architecture
    qualifier when it auto-detects the package name in the environment.
    
    Document the requirement to add the architecture qualifier for such
    packages in the manual page.

diff --git a/debian/changelog b/debian/changelog
index 5588f9b..9eb20a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -138,6 +138,9 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Fix dpkg-maintscript-helper rm_conffile and mv_conffile to do nothing
     when the conffile is no longer owned by the current (or named) package.
     Thanks to Steve Langasek for the patch. Closes: #716948
+  * Improve dpkg-maintscript-helper behaviour in “Multi-Arch: same” packages
+    by arch-qualifying package names read from the environment. Also add
+    a warning about this potential problem in the manual page.
 
   [ Updated programs translations ]
   * Fix typo in Spanish translation of update-alternatives.
diff --git a/man/dpkg-maintscript-helper.1 b/man/dpkg-maintscript-helper.1
index 690e2f2..e3a9b12 100644
--- a/man/dpkg-maintscript-helper.1
+++ b/man/dpkg-maintscript-helper.1
@@ -88,9 +88,10 @@ modifying the maintainer scripts to clean up the obsolete 
file,
 now preparing, not the first version of the package that lacked the
 conffile.
 .P
-\fIpackage\fP is the package name. If empty or omitted, the
-\fBDPKG_MAINTSCRIPT_PACKAGE\fP environment variable (as set by \fBdpkg\fP)
-will be used.
+\fIpackage\fP is the package name. When the package is "Multi-Arch: same",
+this parameter must include the architecture qualifier. If empty or
+omitted, the \fBDPKG_MAINTSCRIPT_PACKAGE\fP environment variable (as set
+by \fBdpkg\fP) will be used.
 .P
 All the parameters of the maintainer scripts have to be forwarded to the
 program after \fB\-\-\fP.
@@ -128,9 +129,10 @@ should trigger the rename of the conffile (see the notes 
for
 is empty or omitted, then the operation is tried on every upgrade (note: it's
 safer to give the version and have the operation tried only once).
 .P
-\fIpackage\fP is the package name. If empty or omitted, the
-\fBDPKG_MAINTSCRIPT_PACKAGE\fP environment variable (as set by \fBdpkg\fP)
-will be used.
+\fIpackage\fP is the package name. When the package is "Multi-Arch: same",
+this parameter must include the architecture qualifier. If empty or
+omitted, the \fBDPKG_MAINTSCRIPT_PACKAGE\fP environment variable (as set
+by \fBdpkg\fP) will be used.
 .P
 All the parameters of the maintainer scripts have to be forwarded to the
 program after \fB\-\-\fP.
diff --git a/scripts/dpkg-maintscript-helper.sh 
b/scripts/dpkg-maintscript-helper.sh
index 588019b..368fabf 100755
--- a/scripts/dpkg-maintscript-helper.sh
+++ b/scripts/dpkg-maintscript-helper.sh
@@ -32,10 +32,10 @@ rm_conffile() {
        local PACKAGE="$3"
        if [ "$LASTVERSION" = "--" ]; then
                LASTVERSION=""
-               PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE"
+               
PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}"
        fi
        if [ "$PACKAGE" = "--" -o -z "$PACKAGE" ]; then
-               PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE"
+               
PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}"
        fi
        # Skip remaining parameters up to --
        while [ "$1" != "--" -a $# -gt 0 ]; do shift; done
@@ -139,10 +139,10 @@ mv_conffile() {
        local PACKAGE="$4"
        if [ "$LASTVERSION" = "--" ]; then
                LASTVERSION=""
-               PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE"
+               
PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}"
        fi
        if [ "$PACKAGE" = "--" -o -z "$PACKAGE" ]; then
-               PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE"
+               
PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}"
        fi
        # Skip remaining parameters up to --
        while [ "$1" != "--" -a $# -gt 0 ]; do shift; done

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to