tags 416646 patch
thanks

Hi Jean-Michel,

Never too early to start preparing for lenny :)

I've prepared a 0-day NMU for this release critical bug.  Please find the
patch attached; the NMU will be uploaded to incoming shortly.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/
diff -u amavis-stats-0.1.12/debian/postrm amavis-stats-0.1.12/debian/postrm
--- amavis-stats-0.1.12/debian/postrm
+++ amavis-stats-0.1.12/debian/postrm
@@ -5,9 +5,6 @@
 
 set -e
 
-# Source debconf library.
-. /usr/share/debconf/confmodule
-
 # summary of how this script can be called:
 #        * <postrm> `remove'
 #        * <postrm> `purge'
@@ -40,33 +37,37 @@
 
 case "$1" in
     remove|abort-install|abort-upgrade|failed-upgrade|disappear)
-    	# Remove apache config if wanted.
-	db_get amavis-stats/config_apache
-    	webserver="$RET"
-    	case "$webserver" in
-    		Apache)        webservers="apache";;
-    		Apache-SSL)    webservers="apache-ssl";;
-	        Apache2)       webservers="apache2";;
-    		Both)          webservers="apache apache-ssl";;
-    		*)             webservers="";;
-    	esac
-
-   	if [ ! -z "$webservers" ]; then
-    		configapache
-    	fi
-        ;;
+	# Remove apache config if wanted.
+	if [ -f /usr/share/debconf/confmodule ]; then
+		. /usr/share/debconf/confmodule
+		db_get amavis-stats/config_apache
+	    	webserver="$RET"
+	    	case "$webserver" in
+	    		Apache)        webservers="apache";;
+    			Apache-SSL)    webservers="apache-ssl";;
+	        	Apache2)       webservers="apache2";;
+	    		Both)          webservers="apache apache-ssl";;
+    			*)             webservers="";;
+    		esac
+
+		if [ ! -z "$webservers" ]; then
+			configapache
+		fi
+	fi
+	;;
     purge)
 	dpkg-statoverride --remove /var/lib/amavis-stats
 	dpkg-statoverride --remove /var/cache/amavis-stats
 
-    	db_get amavis-stats/stay_on_purge
-    	if [ "$RET" = "true" ]; then
+	if [ -f /usr/share/debconf/confmodule ]; then
+		db_get amavis-stats/stay_on_purge
+		if [ "$RET" = "true" ]; then
 			rm -rf /var/lib/amavis-stats
-    			rm -rf /var/cache/amavis-stats
-    	fi
+			rm -rf /var/cache/amavis-stats
+		fi
+	fi
 
 	getent passwd amavis-stats >/dev/null && deluser amavis-stats
-    	db_purge
     	;;	
     upgrade)
 	;;
diff -u amavis-stats-0.1.12/debian/changelog amavis-stats-0.1.12/debian/changelog
--- amavis-stats-0.1.12/debian/changelog
+++ amavis-stats-0.1.12/debian/changelog
@@ -1,3 +1,13 @@
+amavis-stats (0.1.12-7.4) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for RC bugfix.
+  * Guard the calls to debconf in the postrm so that they work even if
+    debconf has already been removed; and drop the duplicate call to
+    db_purge.  Closes: #416646.
+
+ -- Steve Langasek <[EMAIL PROTECTED]>  Mon, 14 May 2007 22:51:18 -0700
+
 amavis-stats (0.1.12-7.3) unstable; urgency=low
 
   * Non-maintainer upload to complete former non-maintainer upload..:-)

Reply via email to