[vim] 02/05: Remove alternatives for vim-gnome

James McCoy jamessan at debian.org
Thu Sep 8 02:14:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 5e66bd8d52d476963e079ebeb89c8142decfa6fb
Author: James McCoy <jamessan at debian.org>
Date:   Tue Sep 6 07:01:30 2016 -0400

    Remove alternatives for vim-gnome
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/vim-gnome.postinst   |  2 ++
 debian/vim-variant.postinst | 23 +++--------------------
 debian/vim-variant.prerm    | 18 ++----------------
 3 files changed, 7 insertions(+), 36 deletions(-)

diff --git a/debian/vim-gnome.postinst b/debian/vim-gnome.postinst
index 508f678..df7fab2 100644
--- a/debian/vim-gnome.postinst
+++ b/debian/vim-gnome.postinst
@@ -4,6 +4,8 @@ set -e
 dpkg-maintscript-helper symlink_to_dir \
   /usr/share/doc/vim-gnome vim-gui-common 2:7.4.2330-1~ vim-gnome -- "$@"
 
+update-alternatives --remove gnome-text-editor /usr/bin/vim.gnome
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/vim-variant.postinst b/debian/vim-variant.postinst
index 0ef69d1..ff5f050 100644
--- a/debian/vim-variant.postinst
+++ b/debian/vim-variant.postinst
@@ -5,21 +5,8 @@ pkg=@PKG@
 variant=@VARIANT@
 mandir=/usr/share/man
 
-# two things to do:
-# 1) add /usr/bin/vim.variant as alternative for /usr/bin/vim. Priority are
-#    chosen accordingly to the principle: ``more features, higher priority''
-# 2) add /usr/bin/gvim as an alternative for gnome-text-editor for variants
-#    built with gnome support. Same principle for the priority above, with the
-#    additional constraint that priority should not be higher than gedit's
-
-add_gnome_alternative () {
-  if [ -f /usr/bin/gvim ]; then
-    update-alternatives --install /usr/bin/gnome-text-editor \
-      gnome-text-editor /usr/bin/vim.$variant $1 \
-      --slave $mandir/man1/gnome-text-editor.1.gz gnome-text-editor.1.gz \
-              $mandir/man1/vim.1.gz
-  fi
-}
+# add /usr/bin/vim.variant as alternative for /usr/bin/vim. Priority are
+# chosen accordingly to the principle: ``more features, higher priority''
 
 add_variant_alternative () {
   if [ "$variant" != "tiny" ]; then
@@ -38,7 +25,7 @@ add_variant_alternative () {
               $mandir/man1/vim.1.gz
   done
   case "$variant" in
-    gtk|gtk3|gnome|athena) # gui enabled variants
+    gtk|gtk3|athena) # gui enabled variants
       add_gui_variant_alternative $1
       ;;
   esac
@@ -63,10 +50,6 @@ case "$pkg" in
   vim-gtk|vim-gtk3|vim-athena)
     add_variant_alternative 50
     ;;
-  vim-gnome) # gnome enabled variant
-    add_variant_alternative 60
-    add_gnome_alternative 45
-    ;;
 esac
 
 #DEBHELPER#
diff --git a/debian/vim-variant.prerm b/debian/vim-variant.prerm
index baee170..0d7fb68 100644
--- a/debian/vim-variant.prerm
+++ b/debian/vim-variant.prerm
@@ -4,23 +4,14 @@ set -e
 pkg=@PKG@
 variant=@VARIANT@
 
-# two things to do:
-# 1) remove /usr/bin/vim.variant as alternative for /usr/bin/vim
-# 2) remove /usr/bin/gvim as an alternative for gnome-text-editor for
-#    variants built with gnome support
-
-remove_gnome_alternative () {
-  if [ -f /usr/bin/vim.$variant ]; then
-    update-alternatives --remove gnome-text-editor /usr/bin/vim.$variant
-  fi
-}
+# remove /usr/bin/vim.variant as alternative for /usr/bin/vim
 
 remove_variant_alternative () {
   for i in vi view ex editor rvim rview vimdiff vim; do
     update-alternatives --remove $i /usr/bin/vim.$variant
   done
   case "$variant" in
-    gtk|gtk3|athena|gnome) # gui enabled variants
+    gtk|gtk3|athena) # gui enabled variants
       remove_gui_variant_alternative
       ;;
   esac
@@ -35,11 +26,6 @@ remove_gui_variant_alternative () {
 case "$1" in
   # 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
     ;;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git



More information about the pkg-vim-maintainers mailing list