[SCM] Vim packaging branch, debian, updated. upstream/7.1.285-93-g41475d4
James Vega
jamessan at debian.org
Sun May 4 04:03:52 UTC 2008
The following commit has been merged in the debian branch:
commit 41475d4170b5a51ceb7881dd3d6ca98a7b7546f5
Author: James Vega <jamessan at debian.org>
Date: Sat May 3 23:39:47 2008 -0400
Revisit maintainer scripts switching on $1
Remove $1 checks in vim-variant.postinst as adding alternatives is safe to
perform whenever postinst is called.
Adjust $1 checks in vim-variant.prerm so that alternatives are also removed
during deconfigure. Alternatives aren't removed in other uses because we
don't want to affect users' configured preferences.
Closes #411697
Signed-off-by: James Vega <jamessan at debian.org>
diff --git a/debian/vim-variant.postinst b/debian/vim-variant.postinst
index ad5a526..d901e76 100644
--- a/debian/vim-variant.postinst
+++ b/debian/vim-variant.postinst
@@ -53,27 +53,23 @@ replace_dir_w_symlink () {
fi
}
-case "$1" in
- configure)
- case "$pkg" in
- vim-tiny)
- add_variant_alternative 10
- ;;
- vim)
- add_variant_alternative 30
- replace_dir_w_symlink /usr/share/doc/vim vim-common
- ;;
- vim-nox)
- add_variant_alternative 40
- ;;
- vim-gtk|vim-lesstif)
- add_variant_alternative 50
- ;;
- vim-gnome) # gnome enabled variant
- add_variant_alternative 60
- add_gnome_alternative 45
- ;;
- esac
+case "$pkg" in
+ vim-tiny)
+ add_variant_alternative 10
+ ;;
+ vim)
+ add_variant_alternative 30
+ replace_dir_w_symlink /usr/share/doc/vim vim-common
+ ;;
+ vim-nox)
+ add_variant_alternative 40
+ ;;
+ vim-gtk|vim-lesstif)
+ add_variant_alternative 50
+ ;;
+ vim-gnome) # gnome enabled variant
+ add_variant_alternative 60
+ add_gnome_alternative 45
;;
esac
diff --git a/debian/vim-variant.prerm b/debian/vim-variant.prerm
index eecb562..5441989 100644
--- a/debian/vim-variant.prerm
+++ b/debian/vim-variant.prerm
@@ -45,14 +45,23 @@ remove_gui_variant_alternative () {
}
case "$1" in
- remove)
+ # only remove in remove/deconfigure so we don't disrupt users' preferences
+ remove|deconfigure)
case "$pkg" in
vim-gnome) # gnome enabled variants
remove_gnome_alternative
- ;;
+ ;;
esac
remove_variant_alternative
;;
+
+ upgrade|failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
esac
#DEBHELPER#
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list