[Python-apps-commits] r690 - in packages/pypolicyd-spf/trunk/debian (1 file)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Sat Feb 23 20:35:16 UTC 2008


    Date: Saturday, February 23, 2008 @ 20:35:15
  Author: piotr
Revision: 690

some additional comments and tests (just in case)

Modified:
  packages/pypolicyd-spf/trunk/debian/postfix-policyd-spf-python.postrm

Modified: packages/pypolicyd-spf/trunk/debian/postfix-policyd-spf-python.postrm
===================================================================
--- packages/pypolicyd-spf/trunk/debian/postfix-policyd-spf-python.postrm	2008-02-23 20:13:01 UTC (rev 689)
+++ packages/pypolicyd-spf/trunk/debian/postfix-policyd-spf-python.postrm	2008-02-23 20:35:15 UTC (rev 690)
@@ -1,10 +1,14 @@
 #! /bin/sh
 
-# conffile renamed in 0.5.2-3 
-if dpkg --compare-versions "$2" lt-nl "0.5.2-4"; then
-    # downgrading to < 0.5.2-3 -- restore old conffile name
+# conffile renamed in 0.6-1
+if dpkg --compare-versions "$2" lt-nl "0.6-1"; then
+    # "$1" is equal to "upgrade" (which means downgrading in this case) or "abort-upgrade"
+    # downgrading to <0.6-1 (0.5.2-3 most probably) -- restore old conffile name
     if [ ! -e /etc/python-policyd-spf/policyd-spf.conf ]; then
-        mv /etc/postfix-policyd-spf-python/policyd-spf.conf /etc/python-policyd-spf/policyd-spf.conf
+	test ! -d /etc/python-policyd-spf && mkdir /etc/python-policyd-spf/
+	# policyd-spf.conf should exist but lets test it anyway
+	test -f /etc/postfix-policyd-spf-python/policyd-spf.conf && \
+	mv /etc/postfix-policyd-spf-python/policyd-spf.conf /etc/python-policyd-spf/policyd-spf.conf
 	rmdir /etc/postfix-policyd-spf-python/
     fi
 




More information about the Python-apps-commits mailing list