Hello community, here is the log from the commit of package python3-lesscpy for openSUSE:Factory checked in at 2016-08-18 09:17:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-lesscpy (Old) and /work/SRC/openSUSE:Factory/.python3-lesscpy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-lesscpy" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-lesscpy/python3-lesscpy.changes 2016-06-19 10:49:04.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-lesscpy.new/python3-lesscpy.changes 2016-08-18 09:17:28.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com + +- Fix update-alternatives implementation. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-lesscpy.spec ++++++ --- /var/tmp/diff_new_pack.IP3VWa/_old 2016-08-18 09:17:29.000000000 +0200 +++ /var/tmp/diff_new_pack.IP3VWa/_new 2016-08-18 09:17:29.000000000 +0200 @@ -36,7 +36,7 @@ Requires: python3-six BuildArch: noarch Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(preun): update-alternatives %description python LessCss Compiler. @@ -55,33 +55,32 @@ %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} -mv %{buildroot}%{_bindir}/lesscpy{,-%{py3_ver}} -ln -s %{_bindir}/lesscpy-%{py3_ver} %{buildroot}%{_bindir}/lesscpy + +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +mv %{buildroot}%{_bindir}/lesscpy %{buildroot}%{_bindir}/lesscpy-%{py3_ver} +ln -s -f %{_sysconfdir}/alternatives/lesscpy %{buildroot}%{_bindir}/lesscpy # Unit tests are broken # %check # rm test/*.pyc # python3 setup.py test -%pre -# Since /usr/bin/lesscpy became ghosted to be used with update-alternatives, we -# have to get rid of the old binary: -[ -h %{_bindir}/lesscpy ] || rm -f %{_bindir}/lesscpy - %post -update-alternatives \ +%_sbindir/update-alternatives \ --install %{_bindir}/lesscpy lesscpy %{_bindir}/lesscpy-%{py3_ver} 30 %preun if [ $1 -eq 0 ] ; then - update-alternatives --remove lesscpy %{_bindir}/lesscpy-%{py3_ver} + %_sbindir/update-alternatives --remove lesscpy %{_bindir}/lesscpy-%{py3_ver} fi %files %defattr(-,root,root,-) %doc LICENSE README.rst -%ghost %{_bindir}/lesscpy +%{_bindir}/lesscpy %{_bindir}/lesscpy-%{py3_ver} +%ghost %{_sysconfdir}/alternatives/lesscpy %{python3_sitelib}/lesscpy %{python3_sitelib}/lesscpy-%{version}-py%{py3_ver}.egg-info