tags 606810 + pending
thanks

Dear maintainer,

I've prepared an NMU for systraq (versioned as 0.0.20081217-2.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
  ,''`.  Julien Valroff ~ <jul...@kirya.net> ~ <jul...@debian.org>
 : :' :  Debian Developer & Free software contributor
 `. `'   http://www.kirya.net/
   `-    4096R/ E1D8 5796 8214 4687 E416  948C 859F EF67 258E 26B1
diff -u systraq-0.0.20081217/debian/changelog systraq-0.0.20081217/debian/changelog
--- systraq-0.0.20081217/debian/changelog
+++ systraq-0.0.20081217/debian/changelog
@@ -1,3 +1,14 @@
+systraq (0.0.20081217-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Don't rely on deluser --remove-home option to remove thte
+    debian-systraq user home directory (Closes: #606810)
+  * Ensure dpkg --compare-versions calls don't fail if the
+    "most-recently-configured-version" argument is not passed to
+    postinst
+
+ -- Julien Valroff <jul...@debian.org>  Tue, 21 Dec 2010 06:54:22 +0100
+
 systraq (0.0.20081217-2) unstable; urgency=low
 
   * debian/postrm: don't fail hard if perl-modules not installed during
diff -u systraq-0.0.20081217/debian/postinst systraq-0.0.20081217/debian/postinst
--- systraq-0.0.20081217/debian/postinst
+++ systraq-0.0.20081217/debian/postinst
@@ -20,7 +20,8 @@
 
     if getent passwd $OLDSYSTRAQUSER > /dev/null 2>&1 && [ $USERMISSING = 1 ]
     then
-        if dpkg --compare-versions $2 le-nl $OLDVERSION
+		if [ -n "$2" ]; then
+        if dpkg --compare-versions "$2" le-nl "$OLDVERSION"
         then
             # we are upgraded from a package version where the systraq user
             # is called `systraq'.
@@ -42,6 +43,7 @@
 Make sure you have a /etc/cron.d/systraq file from systraq >> $OLDVERSION.
 EOT
         fi
+	    fi
     fi
 
     test -f /var/lib/systraq/.forward || echo root > /var/lib/systraq/.forward
@@ -96,9 +98,11 @@
         cp /usr/share/doc/systraq/examples/systraq_is_unconfigured /etc/systraq/
     fi
 
-    if dpkg --compare-versions $2 le-nl $MD5VERSION
-    then
-        cp /usr/share/doc/systraq/examples/systraq_is_not_upgraded /etc/systraq/
+    if [ -n "$2" ]; then
+        if dpkg --compare-versions $2 le-nl $MD5VERSION
+        then
+            cp /usr/share/doc/systraq/examples/systraq_is_not_upgraded /etc/systraq/
+        fi
     fi
 
     ;;
diff -u systraq-0.0.20081217/debian/postrm systraq-0.0.20081217/debian/postrm
--- systraq-0.0.20081217/debian/postrm
+++ systraq-0.0.20081217/debian/postrm
@@ -24,9 +24,8 @@
 		    # see http://wiki.debian.org/AccountHandlingInMaintainerScripts
 		    # for rationale
 		    if [ -x "$(command -v deluser)" ]; then
-			# --remove-home needs package perl-modules
-			deluser --remove-home --system --quiet debian-systraq > /dev/null ||
-			  deluser --system --quiet debian-systraq > /dev/null || true
+             SYSTRAQ_USER_HOME=~debian-systraq
+             (deluser --system --quiet debian-systraq && rm -r $SYSTRAQ_USER_HOME) > /dev/null 2>&1 || true
 		    else
 			echo >&2 "not removing debian-systraq system account because deluser command was not found"
 		    fi

Reply via email to