[Pkg-mailman-hackers] Pkg-mailman commit - rev 559 - trunk/debian

Thijs Kinkhorst thijs at alioth.debian.org
Mon Aug 11 14:23:08 UTC 2008


Author: thijs
Date: 2008-08-11 14:23:08 +0000 (Mon, 11 Aug 2008)
New Revision: 559

Modified:
   trunk/debian/postinst
Log:
revert cleanup for now so we have a clean package update for etch


Modified: trunk/debian/postinst
===================================================================
--- trunk/debian/postinst	2008-08-07 11:38:19 UTC (rev 558)
+++ trunk/debian/postinst	2008-08-11 14:23:08 UTC (rev 559)
@@ -16,6 +16,14 @@
 DIRLIST="/usr/lib/mailman/Mailman /usr/lib/mailman/bin /usr/lib/mailman/cron /usr/lib/mailman/scripts"
 PYLIBDIR="/usr/lib/python`python -c 'import sys; print sys.version[:3]'`"
 
+if md5sum -c /dev/null 2>/dev/null; [ "$?" = 3 ]; then
+    # We are using dpkg's md5sum
+    md5sum="md5sum -v"
+else
+    # We are using coreutils' md5sum (hopefully)
+    md5sum=md5sum
+fi
+
 if [ "$1" = "configure" ]; then
 
     mm_etc=/etc/mailman
@@ -59,7 +67,11 @@
         md5sums=$(tempfile --prefix=mm_${lang})
         grep "^[[:xdigit:]]{32}[[:space:]]\+${mm_etc}/$lang/" /var/lib/ucf/hashfile >${md5sums} || true
           # Language files are under ucf control, check md5sums
-          for file in $(md5sum -c ${md5sums} 2>&1 | sed -n 's/: *OK$//p'); do 
+          # LEM: The ":\?" is there to accomodate both md5sum from dpkg (in sarge)
+          #      and md5sum from coreutils (in etch and onwards).
+          #      It breaks with md5sum-from-dpkg if a filename ends with ":",
+          #      but this is not expected to happen.
+          for file in $(${md5sum} -c ${md5sums} 2>&1 | sed -n 's/:\? *OK$//p'); do 
             ucf --debconf-ok --purge ${file}
             rm -f ${file} ${file}.dpkg-dist
             printf . >&2
@@ -83,6 +95,9 @@
         printf . >&2
         langfile=${lang}/${file}
         ucf --debconf-ok --three-way ${mm_dist}/${langfile} ${mm_etc}/${langfile} 2>/dev/null
+        # Upon install ucf leaves a duplicate in .dpkg-dist (Bug #238730), remove it
+        cmp -s ${mm_etc}/${langfile} ${mm_etc}/${langfile}.dpkg-dist \
+          && rm ${mm_etc}/${langfile}.dpkg-dist
       done
       printf " done.\n" >&2
     done
@@ -92,6 +107,11 @@
     ucf --debconf-ok --three-way ${mm_dist}/qmail-to-mailman.py ${mm_etc}/qmail-to-mailman.py 2>/dev/null
     # Install postfix-to-mailman.py as well
     ucf --debconf-ok --three-way ${mm_dist}/postfix-to-mailman.py ${mm_etc}/postfix-to-mailman.py 2>/dev/null
+    # Upon install ucf leaves a duplicate in .dpkg-dist (Bug #238730), remove it
+    for file in qmail-to-mailman.py postfix-to-mailman.py; do
+      cmp -s ${mm_etc}/${file} ${mm_etc}/${file}.dpkg-dist \
+        && rm ${mm_etc}/${file}.dpkg-dist
+    done
 
     # Configure Mailman crontab
 




More information about the Pkg-mailman-hackers mailing list