[SCM] Vim packaging branch, debian, updated. upstream/7.2.000-237-g07c31dd
James Vega
jamessan at debian.org
Mon Sep 22 06:56:53 UTC 2008
The following commit has been merged in the debian branch:
commit 07c31dda2eb24247ef00375cef647de98b789a3e
Author: James Vega <jamessan at debian.org>
Date: Sun Sep 21 22:32:40 2008 -0400
Handle /etc/vim/vimrc.tiny removal from vim-common
Since dpkg doesn't remove conffiles on its own, need to add a preinst
for vim-common which does this for us.
Signed-off-by: James Vega <jamessan at debian.org>
diff --git a/debian/vim-common.preinst b/debian/vim-common.preinst
new file mode 100644
index 0000000..d7a81d1
--- /dev/null
+++ b/debian/vim-common.preinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+rm_conffile() {
+ PKGNAME="$1"
+ CONFFILE="$2"
+ if [ -e "$CONFFILE" ]; then
+ md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
+ old_md5sum="$(dpkg-query -W -f='${Conffiles}\n' $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
+ fi
+}
+
+case "$1" in
+ install|upgrade)
+ if dpkg --compare-versions "$2" le "1:7.1.293-1"; then
+ rm_conffile vim-common /etc/vim/vimrc.tiny
+ fi
+esac
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list