[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.48-79-gdf94975
Andreas Beckmann
debian at abeckmann.de
Sat Jan 12 11:33:17 UTC 2013
The following commit has been merged in the master branch:
commit e76064eb478fcb2e61792ff9e68264601ae86eb9
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sat Dec 1 12:44:01 2012 +0100
new custom script: pre_remove_40_find_obsolete_conffiles
report obsolete conffiles after package upgrade
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/custom-scripts/scripts/pre_remove_40_find_obsolete_conffiles b/custom-scripts/scripts/pre_remove_40_find_obsolete_conffiles
new file mode 100755
index 0000000..d1fb9cd
--- /dev/null
+++ b/custom-scripts/scripts/pre_remove_40_find_obsolete_conffiles
@@ -0,0 +1,27 @@
+#!/bin/sh
+set -e
+
+for pkg in ${PIUPARTS_OBJECTS%%=*}
+do
+ dpkg-query -W -f='${Conffiles}\n' $pkg | \
+ grep ' obsolete$' | \
+ while read file md5expected obs
+ do
+ info="OBSOLETE CONFFILE $file REGISTERED BY $pkg"
+ query=$(dpkg-query -S $file)
+ owner=${query%: ${file}}
+ if [ "$owner" != "$pkg" ]; then
+ info="${info} OWNER CHANGED TO $owner"
+ fi
+ if [ ! -f "$file" ]; then
+ info="${info} (MISSING)"
+ else
+ md5=$(md5sum "$file" | awk '{ print $1 }')
+ if [ "$md5expected" != "$md5" ]; then
+ info="${info} (MODIFIED)"
+ fi
+ fi
+
+ echo "$info"
+ done
+done
diff --git a/debian/changelog b/debian/changelog
index 4eec69d..7799785 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,8 @@ piuparts (0.49) UNRELEASED; urgency=low
- Hardlink the logfiles to the htdocs tree (with copy as fallback).
* post_setup_squeeze-fake-essential: Restrict fake-essential install-info to
the 4 packages that actually need this.
+ * New custom script: pre_remove_40_find_obsolete_conffiles, report obsolete
+ conffiles after package upgrades. Suggested by Michael Biebl.
* pre_remove_50_find_missing_copyright: Skip check for packages that are not
installed or have only config files remaining.
* post_remove_cleanup: Cleanup dovecot certificates.
--
piuparts git repository
More information about the Piuparts-commits
mailing list