[Pkg-dspam-commits] [SCM] Debian packages for the DSPAM anti-spam filter branch, master, updated. debian/3.10.2+dfsg-2-5-g2bcecff

Thomas Preud'homme robotux at celest.fr
Thu Dec 20 06:49:07 UTC 2012


The following commit has been merged in the master branch:
commit e2bad340ea565591d08455078c4dec747f3b5fb1
Author: Thomas Preud'homme <robotux at celest.fr>
Date:   Sat Dec 15 17:47:58 2012 +0100

    Fix dspam user locking in postrm
    
    Only lock dspam user in purge when this is the last libdspam7 package to
    be purged since several libdspam7 packages can be installed with
    multiarch.

diff --git a/debian/changelog b/debian/changelog
index 92ff6be..9fd9b8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,11 @@
 dspam (3.10.2+dfsg-3) unstable; urgency=low
 
+  * Only lock dspam user account when the last libdspam7 package is purged
+    (Thanks Jakub Wilk for the review, Closes: #695275).
   * debian/control:
     + Update my maintainer email address.
 
- -- Thomas Preud'homme <robotux at debian.org>  Wed, 19 Dec 2012 02:35:33 +0100
+ -- Thomas Preud'homme <robotux at debian.org>  Thu, 20 Dec 2012 06:56:43 +0100
 
 dspam (3.10.2+dfsg-2) unstable; urgency=low
 
diff --git a/debian/libdspam7.postrm b/debian/libdspam7.postrm
index 3841a02..ae14b30 100644
--- a/debian/libdspam7.postrm
+++ b/debian/libdspam7.postrm
@@ -1,9 +1,16 @@
 #!/bin/sh
 set -e
 
+# Locks dspam system account on purge of last package
 if [ "$1" = "purge" ] ; then
-    # locks dspam system account on purge
-    usermod -L -e 1 dspam > /dev/null || true
+    # Multi-arch was added in dpkg in the same version as the db:Status-Abbrev
+    # virtual field was added to dpkg-query. Hence, either this bug cannot be
+    # encountered, or db:Status-Abbrev virtual field is available in dpkg-query.
+    if ! dpkg --assert-multi-arch ||
+       ! dpkg-query '-f=${db:Status-Abbrev}\n' -W libdspam7 | grep -vE '(.n|pc)' >/dev/null
+    then
+        usermod -L -e 1 dspam > /dev/null || true
+    fi
 fi
 
 #DEBHELPER#

-- 
Debian packages for the DSPAM anti-spam filter



More information about the Pkg-dspam-commits mailing list