From 09603db66d6efd05183573f996e0c6cb2884392cb012fa1d1558ce66e9ad6ccf Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 15 Aug 2016 15:36:52 +0000 Subject: [PATCH] Accepting request 419446 from home:TheBlackCat:branches:devel:languages:python Fix update-alternatives implementation. OBS-URL: https://build.opensuse.org/request/show/419446 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=24 --- python-flake8.changes | 5 +++++ python-flake8.spec | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/python-flake8.changes b/python-flake8.changes index ceb1987..53deca3 100644 --- a/python-flake8.changes +++ b/python-flake8.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com + +- Fix update-alternatives implementation. + ------------------------------------------------------------------- Wed Jan 13 09:25:06 UTC 2016 - toddrme2178@gmail.com diff --git a/python-flake8.spec b/python-flake8.spec index 4ffc9a5..a3e95a5 100644 --- a/python-flake8.spec +++ b/python-flake8.spec @@ -36,7 +36,7 @@ Requires: python-mccabe >= 0.2.1 Requires: python-pep8 >= 1.5.7 Requires: python-pyflakes >= 0.8.1 Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(preun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -66,16 +66,14 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot} mkdir -p %{buildroot}%{_sysconfdir}/alternatives mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver} ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8 -# create a dummy target for /etc/alternatives/flake8 -touch %{buildroot}%{_sysconfdir}/alternatives/flake8 %post -"%_sbindir/update-alternatives" \ +%_sbindir/update-alternatives \ --install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30 -%postun +%preun if [ $1 -eq 0 ] ; then - "%_sbindir/update-alternatives" --remove flake8 %{_bindir}/flake8-%{py_ver} + %_sbindir/update-alternatives --remove flake8 %{_bindir}/flake8-%{py_ver} fi %check