Hello community, here is the log from the commit of package python2-pip for openSUSE:Factory checked in at 2020-04-22 20:58:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python2-pip (Old) and /work/SRC/openSUSE:Factory/.python2-pip.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python2-pip" Wed Apr 22 20:58:52 2020 rev:2 rq:796257 version:20.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python2-pip/python2-pip.changes 2020-04-08 19:54:29.785027523 +0200 +++ /work/SRC/openSUSE:Factory/.python2-pip.new.2738/python2-pip.changes 2020-04-22 20:58:53.576090189 +0200 @@ -1,0 +2,5 @@ +Wed Apr 22 10:02:16 UTC 2020 - Matej Cepl <mc...@suse.com> + +- Fix use of alternatives + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python2-pip.spec ++++++ --- /var/tmp/diff_new_pack.UQb4Vn/_old 2020-04-22 20:58:54.428091886 +0200 +++ /var/tmp/diff_new_pack.UQb4Vn/_new 2020-04-22 20:58:54.432091893 +0200 @@ -36,8 +36,8 @@ BuildArch: noarch %description -Pip is a replacement for easy_install. It uses mostly the same techniques for -finding packages, so packages that were made easy_installable should be +Pip is a replacement for pip. It uses mostly the same techniques for +finding packages, so packages that were made pipable should be pip-installable as well. %prep @@ -55,16 +55,24 @@ %install %python2_install -%prepare_alternative pip + +# update-alternatives +mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ +touch %{buildroot}%{_sysconfdir}/alternatives/pip +ln -sf %{_sysconfdir}/alternatives/pip \ + %{buildroot}%{_bindir}/pip + %fdupes %{buildroot}%{python2_sitelib} %post # can't use `python_install_alternative` because it's pipX.Y, not pip-X.Y -PRIO=$(echo %{python_version} | tr -d .) -%install_alternative pip %{_bindir}/pip%{python2_version} $PRIO +%{_sbindir}/update-alternatives --install %{_bindir}/pip \ + pip %{_bindir}/pip2.7 27 %postun -%uninstall_alternative pip %{_bindir}/pip%{python2_version} +if [ ! -f %{_bindir}/pip ] ; then + %{_sbindir}/update-alternatives --remove pip %{_bindir}/pip2.7 +fi %files %license LICENSE.txt