From 9bed0d266353788da715d146d44c203d3ee1f443 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 1 Jan 2007 22:16:16 +0000 Subject: [PATCH] Remove non-modified /etc/dpkg/dpkg.cfg configuration file when upgrading from versions 1.9.21 through 1.10.28, to avoid getting prompted about conffile changes. Closes: #398061 --- debian/changelog | 3 +++ debian/dpkg.preinst | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/debian/changelog b/debian/changelog index 32285ace..2ffe2484 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,9 @@ dpkg (1.13.25~) UNRELEASED; urgency=low * Support extracting lzma compressed source and binary packages, and add a Suggests on package lzma. Closes: #347715 * Add '/emul/ia32-linux' biarch paths to dpkg-shlibdeps. Closes: #403216 + * Remove non-modified /etc/dpkg/dpkg.cfg configuration file when upgrading + from versions 1.9.21 through 1.10.28, to avoid getting prompted about + conffile changes. Closes: #398061 [ Updated dpkg translations ] * Chinese (Traditional, Asho Yeh) diff --git a/debian/dpkg.preinst b/debian/dpkg.preinst index a5895d41..66805b9e 100755 --- a/debian/dpkg.preinst +++ b/debian/dpkg.preinst @@ -143,6 +143,19 @@ remove_hd_method() { } +# Handle upgrades from pre-conffile dpkg.cfg +upgrade_dpkg_non_conffile() +{ + if [ -r /etc/dpkg/dpkg.cfg ]; then + dpkg_cfg_md5="535552ad5ee9145dbc7a34c264df4e59 /etc/dpkg/dpkg.cfg" + if echo "$dpkg_cfg_md5" | md5sum -c >/dev/null 2>&1; then + echo "Removing non-modified dpkg.cfg to be replaced by a conffile ..." + rm -f /etc/dpkg/dpkg.cfg + fi + fi +} + + case "$1" in install) ;; @@ -165,6 +178,12 @@ case "$1" in confirm_dselect_split ;; esac + case "$2" in + # Upgrade from pre-conffile dpkg.cfg + 1.9.21 | 1.10.* ) + upgrade_dpkg_non_conffile + ;; + esac ;; abort-upgrade) -- 2.39.5