[Pkg-mailman-hackers] Pkg-mailman commit - rev 233 - trunk/debian
Lionel Elie Mamane
lmamane-guest at costa.debian.org
Sun Nov 20 16:06:48 UTC 2005
Author: lmamane-guest
Date: 2005-11-20 16:06:48 +0000 (Sun, 20 Nov 2005)
New Revision: 233
Modified:
trunk/debian/changelog
trunk/debian/postinst
Log:
More robust parsing of /var/lib/ucf/hashfile:
- Don't touch files of other packages that happen to have
our file's full path as subpath.
- Accept any number of spaces between the hash and the filename there.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2005-11-20 15:49:54 UTC (rev 232)
+++ trunk/debian/changelog 2005-11-20 16:06:48 UTC (rev 233)
@@ -13,8 +13,12 @@
* Add vietnamese translation (closes: #312673)
* Apply corrections to german translation (closes: #313800)
* Adapt to the md5sum in dpkg or coreutils automatically (closes: #340036)
+ * More robust parsing of /var/lib/ucf/hashfile:
+ - Don't touch files of other packages that happen to have
+ our file's full path as subpath.
+ - Accept any number of spaces between the hash and the filename there.
- -- Lionel Elie Mamane <lmamane at debian.org> Sun, 20 Nov 2005 16:43:51 +0100
+ -- Lionel Elie Mamane <lmamane at debian.org> Sun, 20 Nov 2005 17:06:21 +0100
mailman (2.1.5-9) unstable; urgency=medium
Modified: trunk/debian/postinst
===================================================================
--- trunk/debian/postinst 2005-11-20 15:49:54 UTC (rev 232)
+++ trunk/debian/postinst 2005-11-20 16:06:48 UTC (rev 233)
@@ -62,7 +62,7 @@
# UGLY HACK: Since ucf doesn't support conditional removal
# we access its hashfile directly
md5sums=$(tempfile --prefix=mm_${lang})
- grep ${mm_etc}/$lang/ /var/lib/ucf/hashfile >${md5sums} || true
+ grep "^[[:xdigit:]]{32}[[:space:]]\+${mm_etc}/$lang/" /var/lib/ucf/hashfile >${md5sums} || true
if [ -s ${md5sums} ]; then
# Language files are under ucf control, check md5sums
# LEM: The ":\?" is there to accomodate both md5sum from dpkg (in sarge)
@@ -75,7 +75,7 @@
echo -n . >&2
done
# For modified files remove corresponding .dpkg-dist
- for file in $(grep ${mm_etc}/$lang/ /var/lib/ucf/hashfile | cut -d' ' -f3); do
+ for file in $(grep "^[[:xdigit:]]{32}[[:space:]]\+${mm_etc}/$lang/" /var/lib/ucf/hashfile | awk '{ print $2 }'); do
rm -f ${file}.dpkg-dist
echo -n . >&2
done
More information about the Pkg-mailman-hackers
mailing list