[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:10 UTC 2008
The following commit has been merged in the maint/lenny branch:
commit 4d3e8b72ec64a263e747fc285a1165d17734f1fa
Author: James Vega <jamessan at debian.org>
Date: Thu Oct 9 21:48:42 2008 -0400
vim-runtime Depends on dpkg >= 1.14.20 for sane dpkg-divert behavior
This allows us to cleanup our dpkg-divert code in vim-runtime.preinst and
vim-runtime.postrm.
Conflicts:
debian/vim-runtime.preinst.in
Signed-off-by: James Vega <jamessan at debian.org>
diff --git a/debian/control b/debian/control
index f01af8b..53de940 100644
--- a/debian/control
+++ b/debian/control
@@ -49,6 +49,7 @@ Description: Vi IMproved - Common GUI files
Package: vim-runtime
Priority: optional
Architecture: all
+Depends: dpkg (>= 1.14.20)
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.postrm.in b/debian/vim-runtime.postrm.in
index 9e49073..d603e52 100644
--- a/debian/vim-runtime.postrm.in
+++ b/debian/vim-runtime.postrm.in
@@ -1,4 +1,5 @@
#!/bin/sh
+set -e
basedir=/usr/share/vim/@VIMCUR@/doc
@@ -6,31 +7,10 @@ rm_diversion() {
dpkg-divert --package vim-runtime --rename --remove "$1"
}
-handhold_diversion_removal() {
- # 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
- # during postrm. Because of this, we now have to find whether part of
- # that directory structure is missing, create it if so, add the diversion,
- # and then remove it again.
- availdir=$basedir
- deaddir=
- while [ -n "$availdir" ] && [ ! -d "$availdir" ]; do
- deaddir="${availdir##*/}/$deaddir"
- availdir=${availdir%/*}
- done
- if [ -n "$deaddir" ]; then
- mkdir -p "$availdir/$deaddir"
- fi
- rm_diversion $basedir/help.txt
- rm_diversion $basedir/tags
- if [ -n "$deaddir" ]; then
- (cd ${availdir:-/} && rm -r ${deaddir%%/*})
- fi
-}
-
rm -f /usr/share/vim/addons/doc/tags
if [ "$1" = "remove" ]; then
- handhold_diversion_removal
+ rm_diversion $basedir/help.txt
+ rm_diversion $basedir/tags
fi
#DEBHELPER#
diff --git a/debian/vim-runtime.preinst.in b/debian/vim-runtime.preinst.in
index d64477f..b202e3f 100644
--- a/debian/vim-runtime.preinst.in
+++ b/debian/vim-runtime.preinst.in
@@ -8,34 +8,13 @@ add_diversion() {
--divert "$1.vim-tiny" "$1"
}
-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
- # during preinst. Because of this, we now have to find whether part of
- # that directory structure is missing, create it if so, add the diversion,
- # and then remove it again.
- availdir=$basedir
- deaddir=
- while [ -n "$availdir" ] && [ ! -d "$availdir" ]; do
- deaddir="${availdir##*/}/$deaddir"
- availdir=${availdir%/*}
- done
- if [ -n "$deaddir" ]; then
- mkdir -p "$availdir/$deaddir"
- fi
+# 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
+# previous versioned directories.
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
add_diversion $basedir/help.txt
add_diversion $basedir/tags
- if [ -n "$deaddir" ]; then
- (cd ${availdir:-/} && rm -r ${deaddir%%/*})
- fi
-}
-
-# Also run during upgrade to fix the botched handling of diversions in postrm.
-# If it weren't for the bad handling of diversions in 1:7.1.314-{1,2}, then
-# this would only need to be called during an upgrade from versions prior to
-# 1:7.1.314-1
-if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
- handhold_diversion_setup
fi
#DEBHELPER#
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list