[SCM] Vim packaging branch, debian, updated. upstream/7.1.285-203-gbdd0ad3

James Vega jamessan at debian.org
Thu Jun 26 19:13:29 UTC 2008


The following commit has been merged in the debian branch:
commit 13516673d9b4022071db536c7e6c0a2b3cd39111
Author: James Vega <jamessan at debian.org>
Date:   Thu Jun 26 11:18:22 2008 -0400

    Remove diversions from previous major upstream releases
    
    Signed-off-by: James Vega <jamessan at debian.org>

diff --git a/debian/vim-runtime.preinst.in b/debian/vim-runtime.preinst.in
index d64477f..1ec3d04 100644
--- a/debian/vim-runtime.preinst.in
+++ b/debian/vim-runtime.preinst.in
@@ -8,6 +8,17 @@ add_diversion() {
     --divert "$1.vim-tiny" "$1"
 }
 
+# Used to remove the previous diversion when upgrading from one major release
+# to the next
+remove_previous_diversions() {
+  for v in vim71; do
+    oldpath="$(echo $1 | sed s/@VIMCUR@/$v/)"
+    if dpkg-divert --list 2>/dev/null | grep -q "$oldpath"; then
+      dpkg-divert --remove --rename $oldpath
+    fi
+  done
+}
+
 handhold_diversion_setup() {
   # dpkg-divert requires the parent directory of the file-to-be-diverted or
   # the divert-to-file to exist (#476973), which is unlikely to be the case
@@ -36,6 +47,8 @@ handhold_diversion_setup() {
 # 1:7.1.314-1
 if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
   handhold_diversion_setup
+  remove_previous_diversions $basedir/help.txt
+  remove_previous_diversions $basedir/tags
 fi
 
 #DEBHELPER#

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list