diff --git a/python-pyflakes.changes b/python-pyflakes.changes index a999efe..51f9d59 100644 --- a/python-pyflakes.changes +++ b/python-pyflakes.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com + +- Fix update-alternatives implementation. + ------------------------------------------------------------------- Wed Jan 13 09:57:59 UTC 2016 - toddrme2178@gmail.com diff --git a/python-pyflakes.spec b/python-pyflakes.spec index 6ff793a..fdef9d7 100644 --- a/python-pyflakes.spec +++ b/python-pyflakes.spec @@ -30,7 +30,7 @@ BuildRequires: python-setuptools # the pkg_resources module is required at runtime Requires: python-setuptools Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(preun): update-alternatives %if 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else @@ -55,16 +55,14 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot} mkdir -p %{buildroot}%{_sysconfdir}/alternatives mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{py_ver} ln -s -f %{_sysconfdir}/alternatives/pyflakes %{buildroot}%{_bindir}/pyflakes -# create a dummy target for /etc/alternatives/pyflakes -touch %{buildroot}%{_sysconfdir}/alternatives/pyflakes %post -"%_sbindir/update-alternatives" \ +%_sbindir/update-alternatives \ --install %{_bindir}/pyflakes pyflakes %{_bindir}/pyflakes-%{py_ver} 30 -%postun +%preun if [ $1 -eq 0 ] ; then - "%_sbindir/update-alternatives" --remove pyflakes %{_bindir}/pyflakes-%{py_ver} + %_sbindir/update-alternatives --remove pyflakes %{_bindir}/pyflakes-%{py_ver} fi %files