[SCM] Vim packaging branch, maint/lenny, updated. debian/7.1.314-3-51-g209709e

James Vega jamessan at debian.org
Sun Oct 12 06:29:23 UTC 2008


The following commit has been merged in the maint/lenny branch:
commit 0aa915dbc4790b30e2bb3bc9b793ac4eaa26a9ae
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..94c6722
--- /dev/null
+++ b/debian/vim-common.preinst
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -e
+
+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
+
+#DEBHELPER#
+
+exit 0

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list