Accepting request 487033 from home:scarabeus_iv:branches:editors

- Update the update-alternatives code

OBS-URL: https://build.opensuse.org/request/show/487033
OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=431
This commit is contained in:
Ismail Dönmez 2017-04-10 11:46:50 +00:00 committed by Git OBS Bridge
parent 8cdf18f2e2
commit 8b6db25aff
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Apr 10 11:41:51 UTC 2017 - tchvatal@suse.com
- Update the update-alternatives code
-------------------------------------------------------------------
Wed Apr 5 09:19:45 UTC 2017 - idonmez@suse.com

View File

@ -80,7 +80,7 @@ BuildRequires: update-desktop-files
PreReq: fileutils
PreReq: sh-utils
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(postun): update-alternatives
Recommends: vim-data = %{version}-%{release}
Provides: vi
Provides: vim-base = %{version}-%{release}
@ -120,7 +120,7 @@ Group: Productivity/Editors/Vi
Requires: gvim_client
Requires: vim-data = %{version}-%{release}
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(postun): update-alternatives
Provides: gvim-base = %{version}-%{release}
Provides: gvim-enhanced = %{version}-%{release}
Obsoletes: gvim-base < %{version}-%{release}
@ -336,8 +336,8 @@ LC_ALL=en_US.UTF-8 make test
%post
%{_sbindir}/update-alternatives --install %{_bindir}/vim vim %{_bindir}/vim-nox11 10
%preun
if [ "$1" = 0 ] ; then
%postun
if [ ! -e %{_bindir}/vim-nox11 ] ; then
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-nox11
fi
@ -345,8 +345,8 @@ fi
%{_sbindir}/update-alternatives --install %{_bindir}/vim vim %{_bindir}/gvim 20
%icon_theme_cache_post
%preun -n gvim
if [ "$1" = 0 ] ; then
%prostun -n gvim
if [ ! -e %{_bindir}/gvim ] ; then
%{_sbindir}/update-alternatives --remove vim %{_bindir}/gvim
fi