From a4cbcfa6d3c66b02f73c1661a9824f16dc08e8e109d0e6833043acc9aebcf938 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 17 Aug 2016 10:05:35 +0000 Subject: [PATCH] Accepting request 419482 from devel:languages:python 1 OBS-URL: https://build.opensuse.org/request/show/419482 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-dulwich?expand=0&rev=18 --- python-dulwich.changes | 5 +++++ python-dulwich.spec | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/python-dulwich.changes b/python-dulwich.changes index e9de816..e13d9e3 100644 --- a/python-dulwich.changes +++ b/python-dulwich.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com + +- Fix update-alternatives implementation. + ------------------------------------------------------------------- Thu Jan 14 10:19:50 UTC 2016 - toddrme2178@gmail.com diff --git a/python-dulwich.spec b/python-dulwich.spec index 3a7467b..df35035 100644 --- a/python-dulwich.spec +++ b/python-dulwich.spec @@ -29,7 +29,7 @@ BuildRequires: fdupes BuildRequires: python-Sphinx BuildRequires: python-devel Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(preun): update-alternatives %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif @@ -53,21 +53,19 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives for p in dulwich dul-receive-pack dul-upload-pack ; do mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver} ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p - # create a dummy target for /etc/alternatives/$p - touch %{buildroot}%{_sysconfdir}/alternatives/$p done %fdupes %{buildroot} %post -"%_sbindir/update-alternatives" \ +%_sbindir/update-alternatives \ --install %{_bindir}/dulwich dulwich %{_bindir}/dulwich-%{py_ver} 30 \ --slave %{_bindir}/dul-receive-pack dul-receive-pack %{_bindir}/dul-receive-pack-%{py_ver} \ --slave %{_bindir}/dul-upload-pack dul-upload-pack %{_bindir}/dul-upload-pack-%{py_ver} -%postun +%preun if [ $1 -eq 0 ] ; then - "%_sbindir/update-alternatives" --remove dulwich %{_bindir}/dulwich-%{py_ver} + %_sbindir/update-alternatives --remove dulwich %{_bindir}/dulwich-%{py_ver} fi %files