From c0327c271ca6d41d89d04aa80c323f61cfffb08455e1ced449332ce02b3531f2 Mon Sep 17 00:00:00 2001 From: Denisart Benjamin Date: Fri, 23 Sep 2016 10:30:35 +0000 Subject: [PATCH] Accepting request 429335 from home:okurz:branches:devel:languages:python Provide changelog entry for 'preun/postun' fix OBS-URL: https://build.opensuse.org/request/show/429335 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-future?expand=0&rev=6 --- python-future.changes | 6 ++++++ python-future.spec | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/python-future.changes b/python-future.changes index f93fd4d..9693b60 100644 --- a/python-future.changes +++ b/python-future.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 21 15:56:12 UTC 2016 - okurz@suse.com + +- Fix rpm uninstall warnings by removing alternatives in postun as + discussed in https://build.opensuse.org/request/show/427095 + ------------------------------------------------------------------- Thu Sep 15 15:18:21 UTC 2016 - toddrme2178@gmail.com diff --git a/python-future.spec b/python-future.spec index 0dbd856..837e25b 100644 --- a/python-future.spec +++ b/python-future.spec @@ -28,7 +28,7 @@ BuildRequires: fdupes BuildRequires: python-devel BuildRequires: python-setuptools Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(postun): 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,9 +66,9 @@ done --install %{_bindir}/futurize futurize %{_bindir}/futurize-%{py_ver} 30 \ --slave %{_bindir}/pasteurize pasteurize %{_bindir}/pasteurize-%{py_ver} -%preun -if [ $1 -eq 0 ] ; then - %_sbindir/update-alternatives --remove futurize %{_bindir}/futurize-%{py_ver} +%postun +if [ "$1" = 0 ] ; then + %_sbindir/update-alternatives --remove futurize %{_bindir}/futurize-%{py_ver} fi %files