From 08126897bb83c529e6098134d648a3f44ab4fcffac99062da03c8238d054cd21 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 15 Aug 2016 17:25:59 +0000 Subject: [PATCH] Accepting request 419488 from home:TheBlackCat:branches:devel:languages:python Fix update-alternatives implementation OBS-URL: https://build.opensuse.org/request/show/419488 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parallax?expand=0&rev=14 --- python-parallax.changes | 5 +++++ python-parallax.spec | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/python-parallax.changes b/python-parallax.changes index a7e9718..dd90cea 100644 --- a/python-parallax.changes +++ b/python-parallax.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com + +- Fix update-alternatives implementation. + ------------------------------------------------------------------- Wed Apr 27 08:49:44 UTC 2016 - kgronlund@suse.com diff --git a/python-parallax.spec b/python-parallax.spec index 3b9d963..d6a44cf 100644 --- a/python-parallax.spec +++ b/python-parallax.spec @@ -29,8 +29,8 @@ BuildRequires: python-setuptools BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: openssh BuildArch: noarch -Requires(post): /usr/sbin/update-alternatives -Requires(postun): /usr/sbin/update-alternatives +Requires(post): update-alternatives +Requires(preun): update-alternatives %description Parallax SSH provides an interface to executing commands on multiple @@ -47,18 +47,17 @@ python setup.py build python setup.py install --prefix=%{_prefix} --root=%{buildroot} # create a dummy target for /etc/alternatives/parallax-askpass -mv %{buildroot}%{_bindir}/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass-%{py_ver} mkdir -p %{buildroot}%{_sysconfdir}/alternatives -touch %{buildroot}%{_sysconfdir}/alternatives/parallax-askpass +mv %{buildroot}%{_bindir}/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass-%{py_ver} ln -s -f %{_sysconfdir}/alternatives/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass %post -"%_sbindir/update-alternatives" --install \ - /%{_bindir}/parallax-askpass parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} 20 +%_sbindir/update-alternatives \ + --install %{_bindir}/parallax-askpass parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} 20 -%postun +%preun if [ "$1" = 0 ] ; then - "%_sbindir/update-alternatives" --remove parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} + %_sbindir/update-alternatives --remove parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} fi %files