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