[SCM] Vim packaging branch, debian, updated. upstream/7.2.025-325-gb170d58
James Vega
jamessan at debian.org
Sun Jan 11 16:45:18 UTC 2009
The following commit has been merged in the debian branch:
commit 75a19d8666f4259c8d91455cce56831bd32427df
Author: James Vega <jamessan at debian.org>
Date: Fri Jan 9 20:18:32 2009 -0500
vim-runtime: Remove old version diversions in postinst
Thanks to Matthjis Kooijman <matthjis at stdin.nl> for analysis and patch.
Closes: #503757
Signed-off-by: James Vega <jamessan at debian.org>
diff --git a/debian/control b/debian/control
index 9a15222..edbec5a 100644
--- a/debian/control
+++ b/debian/control
@@ -50,7 +50,6 @@ Package: vim-runtime
Priority: optional
Architecture: all
Depends: dpkg (>= 1.14.20)
-Conflicts: vim-tiny (<< ${source:Version})
Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-nox | vim-tiny
Enhances: vim-tiny
Description: Vi IMproved - Runtime files
diff --git a/debian/vim-runtime.postinst b/debian/vim-runtime.postinst
index e425cb6..34b221d 100644
--- a/debian/vim-runtime.postinst
+++ b/debian/vim-runtime.postinst
@@ -1,12 +1,34 @@
#!/bin/sh
set -e
+basedir=/usr/share/vim/@VIMCUR@/doc
+
+rm_diversion() {
+ dpkg-divert --package vim-runtime --rename --remove "$1"
+}
+
+# Used to remove the previous diversion when upgrading from one major release
+# to the next
+remove_previous_diversions() {
+ for v in vim71 vim72a vim72b vim72c; do
+ oldpath="$(echo $1 | sed s/@VIMCUR@/$v/)"
+ if dpkg-divert --list 2>/dev/null | grep -q "$oldpath"; then
+ rm_diversion $oldpath
+ fi
+ done
+}
+
# Need to run helpztags since we're overwriting /u/s/v/a/d/tags whenever
# vim-runtime is install/upgraded which breaks the help for other vim addons
if which helpztags >/dev/null 2>&1; then
helpztags /usr/share/vim/addons/doc
fi
+if [ "$1" = "configure" ]; then
+ remove_previous_diversions $basedir/help.txt
+ remove_previous_diversions $basedir/tags
+fi
+
#DEBHELPER#
exit 0
diff --git a/debian/vim-runtime.preinst.in b/debian/vim-runtime.preinst.in
index 83d5895..801f19d 100644
--- a/debian/vim-runtime.preinst.in
+++ b/debian/vim-runtime.preinst.in
@@ -31,26 +31,11 @@ check_diversion() {
fi
}
-rm_diversion() {
- dpkg-divert --package vim-runtime --rename --remove "$1"
-}
-
add_diversion() {
dpkg-divert --package vim-runtime --add --rename \
--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 vim72a vim72b vim72c; do
- oldpath="$(echo $1 | sed s/@VIMCUR@/$v/)"
- if dpkg-divert --list 2>/dev/null | grep -q "$oldpath"; then
- rm_diversion $oldpath
- fi
- done
-}
-
# Also run during upgrade to fix the botched handling of diversions in postrm
# in the 1:71.314-{1,2} uploads. This would need to be run during an upgrade
# to a new major upstream version as well to handle removing the diversions in
@@ -61,8 +46,6 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
fi
add_diversion $basedir/help.txt
add_diversion $basedir/tags
- remove_previous_diversions $basedir/help.txt
- remove_previous_diversions $basedir/tags
fi
#DEBHELPER#
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list