[SCM] Vim packaging branch, debian, updated. upstream/7.1.285-116-g3a3a926
James Vega
jamessan at debian.org
Sun May 25 15:12:40 UTC 2008
The following commit has been merged in the debian branch:
commit d925dd73d0659c473baad868645b1a907f4152e0
Author: James Vega <jamessan at debian.org>
Date: Fri May 23 09:27:22 2008 -0400
Use diversions for vim-tiny's fake help file.
Having vim-runtime Replaces: vim-tiny was a bit short-sighted. If vim-runtime
ends up being removed with vim-tiny still installed, the fake help file no
longer exists.
Instead of using Replaces, we now have vim-runtime setup a diversion.
Signed-off-by: James Vega <jamessan at debian.org>
diff --git a/debian/control b/debian/control
index c7853ba..f01af8b 100644
--- a/debian/control
+++ b/debian/control
@@ -49,7 +49,6 @@ Description: Vi IMproved - Common GUI files
Package: vim-runtime
Priority: optional
Architecture: all
-Replaces: vim-tiny
Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-nox | vim-tiny
Enhances: vim-tiny
Description: Vi IMproved - Runtime files
diff --git a/debian/rules b/debian/rules
index 86467a1..360cac7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -134,6 +134,8 @@ DOT_IN_DEPS += debian/vim-gui-common.install
DOT_IN_DEPS += debian/vim-common.links
DOT_IN_DEPS += debian/vim-gui-common.links
DOT_IN_DEPS += debian/vim-runtime.links
+DOT_IN_DEPS += debian/vim-runtime.postrm
+DOT_IN_DEPS += debian/vim-runtime.preinst
DOT_IN_DEPS += debian/runtime/debian.vim
DOT_IN_DEPS_TINY := debian/tiny/vimrc.tiny
diff --git a/debian/vim-runtime.postrm b/debian/vim-runtime.postrm
deleted file mode 100644
index 9f5843c..0000000
--- a/debian/vim-runtime.postrm
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- remove)
- rm -f /usr/share/vim/addons/doc/tags
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/vim-runtime.postrm.in b/debian/vim-runtime.postrm.in
new file mode 100644
index 0000000..b34b2e3
--- /dev/null
+++ b/debian/vim-runtime.postrm.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "$1" in
+ remove)
+ rm -f /usr/share/vim/addons/doc/tags
+ dpkg-divert --package vim-runtime --rename --remove \
+ /usr/share/vim/@VIMCUR@/doc/help.txt
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/vim-runtime.preinst.in b/debian/vim-runtime.preinst.in
new file mode 100644
index 0000000..11b600f
--- /dev/null
+++ b/debian/vim-runtime.preinst.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+basedir=/usr/share/vim/@VIMCUR@
+case "$1" in
+ install)
+ dpkg-divert --package vim-runtime --add --rename \
+ --divert $basedir/doc/help.txt.tiny $basedir/doc/help.txt
+ ;;
+ # Only needed to handle people that had previously used a vim-runtime
+ # which Replaces: vim-tiny
+ upgrade)
+ if ! dpkg-divert --list | grep -q $basedir/doc/help.txt.tiny >/dev/null 2>&1; then
+ [ -f $basedir/doc/help.txt ] || rm $basedir/doc/help.txt
+ dpkg-divert --package vim-runtime --add --rename \
+ --divert $basedir/doc/help.txt.tiny $basedir/doc/help.txt
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list