diff -Nru ttf-indic-fonts-0.5.8ubuntu1/debian/changelog ttf-indic-fonts-0.5.8ubuntu2/debian/changelog --- ttf-indic-fonts-0.5.8ubuntu1/debian/changelog 2010-04-14 22:20:53.000000000 +0200 +++ ttf-indic-fonts-0.5.8ubuntu2/debian/changelog 2010-04-15 14:46:48.000000000 +0200 @@ -1,3 +1,10 @@ +ttf-indic-fonts (1:0.5.8ubuntu2) lucid; urgency=low + + * debian/ttf-indic-fonts-core.preinst: + + Fix defoma config file removal. (LP: #563771) + + -- Felix Geyer Thu, 15 Apr 2010 14:33:02 +0200 + ttf-indic-fonts (1:0.5.8ubuntu1) lucid; urgency=low * Merge from debian unstable, changes: diff -Nru ttf-indic-fonts-0.5.8ubuntu1/debian/ttf-indic-fonts-core.preinst ttf-indic-fonts-0.5.8ubuntu2/debian/ttf-indic-fonts-core.preinst --- ttf-indic-fonts-0.5.8ubuntu1/debian/ttf-indic-fonts-core.preinst 2010-04-14 22:20:53.000000000 +0200 +++ ttf-indic-fonts-0.5.8ubuntu2/debian/ttf-indic-fonts-core.preinst 2010-04-15 14:44:14.000000000 +0200 @@ -2,10 +2,29 @@ set -e +PKG=ttf-indic-fonts-core DEFOMA_OBSOLETE_VERSION=1:0.5.7 DEFOMA_FILE=/etc/defoma/hints/${PKG}.hints # Remove a no-longer used conffile +rm_conffile() { + local PKGNAME="$1" + local CONFFILE="$2" + [ -e "$CONFFILE" ] || return 0 + + local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" + local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \ + sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + else + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE" + fi +} + case "$1" in install|upgrade) if dpkg --compare-versions "$2" lt-nl "$DEFOMA_OBSOLETE_VERSION"; then