diff --git a/vim.changes b/vim.changes index 9058695..4c8ba1b 100644 --- a/vim.changes +++ b/vim.changes @@ -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 diff --git a/vim.spec b/vim.spec index 7ab3dae..e404743 100644 --- a/vim.spec +++ b/vim.spec @@ -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