Hello community, here is the log from the commit of package python-Sphinx for openSUSE:Factory checked in at 2013-05-16 16:18:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Sphinx (Old) and /work/SRC/openSUSE:Factory/.python-Sphinx.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Sphinx" Changes: -------- --- /work/SRC/openSUSE:Factory/python-Sphinx/python-Sphinx.changes 2013-05-13 15:28:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-Sphinx.new/python-Sphinx.changes 2013-05-16 16:18:51.000000000 +0200 @@ -1,0 +2,5 @@ +Thu May 16 10:33:17 UTC 2013 - [email protected] + +- Fix update-alternatives and support upgrade from previous versions + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/python-Sphinx/python3-Sphinx.changes 2013-05-13 15:28:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-Sphinx.new/python3-Sphinx.changes 2013-05-16 16:18:51.000000000 +0200 @@ -1,0 +2,5 @@ +Thu May 16 10:33:34 UTC 2013 - [email protected] + +- Fix update-alternatives and support upgrade from previous versions + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Sphinx.spec ++++++ --- /var/tmp/diff_new_pack.RIycS8/_old 2013-05-16 16:18:51.000000000 +0200 +++ /var/tmp/diff_new_pack.RIycS8/_new 2013-05-16 16:18:51.000000000 +0200 @@ -80,6 +80,9 @@ %prep %setup -q -n Sphinx-%{version} sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning +# Add Interpreter version suffix to entrypoints (and thus /usr/bin binaries) to +# allow for update-alternatives later on: +sed -i 's/\(sphinx-.*\) =/\1-%{py_ver} =/' setup.py %build python setup.py build @@ -89,22 +92,34 @@ %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} for B in apidoc autogen build quickstart ; do - mv %{buildroot}%{_bindir}/sphinx-$B %{buildroot}%{_bindir}/sphinx-$B-%{py_ver} - touch %{buildroot}%{_bindir}/sphinx-$B + ln -s %{_bindir}/sphinx-$B-%{py_ver} %{buildroot}%{_bindir}/sphinx-$B done install -d %{buildroot}%{_mandir}/man1/ for M in all apidoc build quickstart ; do install -m 644 build/sphinx/man/sphinx-$M.1 %{buildroot}%{_mandir}/man1/sphinx-$M-%{py_ver}.1 - touch %{buildroot}%{_mandir}/man1/sphinx-$M.1 + ln -s %{_mandir}/man1/sphinx-$M-%{py_ver}.1 %{buildroot}%{_mandir}/man1/sphinx-$M.1 done %find_lang sphinx %check nosetests +%pre +# Since /usr/bin/sphinx-* became ghosted to be used with update-alternatives, we have +# to get rid of the old binary resulting from the non-update-alternativies-ified package: +[[ ! -L %{_bindir}/sphinx-apidoc ]] && rm -f %{_bindir}/sphinx-apidoc +[[ ! -L %{_bindir}/sphinx-build ]] && rm -f %{_bindir}/sphinx-build +[[ ! -L %{_bindir}/sphinx-autogen ]] && rm -f %{_bindir}/sphinx-autogen +[[ ! -L %{_bindir}/sphinx-quickstart ]] && rm -f %{_bindir}/sphinx-quickstart +[[ ! -L %{_mandir}/man1/sphinx-all.1.gz ]] && rm -f %{_mandir}/man1/sphinx-all.1.gz +[[ ! -L %{_mandir}/man1/sphinx-apidoc.1.gz ]] && rm -f %{_mandir}/man1/sphinx-apidoc.1.gz +[[ ! -L %{_mandir}/man1/sphinx-build.1.gz ]] && rm -f %{_mandir}/man1/sphinx-build.1.gz +[[ ! -L %{_mandir}/man1/sphinx-quickstart.1.gz ]] && rm -f %{_mandir}/man1/sphinx-quickstart.1.gz +exit 0 + %post update-alternatives \ - --install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver} 10 \ + --install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py_ver} 20 \ --slave %{_bindir}/sphinx-build sphinx-build %{_bindir}/sphinx-build-%{py_ver} \ --slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{py_ver} \ --slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{py_ver} \ @@ -113,7 +128,7 @@ --slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/sphinx-build-%{py_ver}.1.gz \ --slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/sphinx-quickstart-%{py_ver}.1.gz \ -%postun +%preun if [ $1 -eq 0 ] ; then update-alternatives --remove sphinx-build %{_bindir}/sphinx-apidoc-%{py_ver} fi ++++++ python3-Sphinx.spec ++++++ --- /var/tmp/diff_new_pack.RIycS8/_old 2013-05-16 16:18:51.000000000 +0200 +++ /var/tmp/diff_new_pack.RIycS8/_new 2013-05-16 16:18:51.000000000 +0200 @@ -77,6 +77,8 @@ %setup -q -n Sphinx-%{version} %patch0 sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning +# Add Interpreter version suffix to entrypoints (and thus /usr/bin binaries) to +# allow for update-alternatives later on: sed -i "s|\(sphinx-.*\) =|\1-%{py3_ver} =|" setup.py # Add Python version suffix to binaries sed -i "s|'\(sphinx-[a-z]*\)'|'\1-%{py3_ver}'|" doc/conf.py # Do the same for man-pages @@ -89,22 +91,35 @@ %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} for B in apidoc autogen build quickstart ; do - touch %{buildroot}%{_bindir}/sphinx-$B + ln -s %{_bindir}/sphinx-$B-%{py3_ver} %{buildroot}%{_bindir}/sphinx-$B done install -d %{buildroot}%{_mandir}/man1/ for M in all apidoc build quickstart ; do install -m 644 build/sphinx/man/sphinx-$M-%{py3_ver}.1 %{buildroot}%{_mandir}/man1/sphinx-$M-%{py3_ver}.1 - touch %{buildroot}%{_mandir}/man1/sphinx-$M.1 + ln -s %{_mandir}/man1/sphinx-$M-%{py3_ver}.1 %{buildroot}%{_mandir}/man1/sphinx-$M.1 done %find_lang sphinx #TODO: Fix #%%check -#nosetests-%{py3_ver} +#nosetests-%%{py3_ver} + +%pre +# Since /usr/bin/sphinx-* became ghosted to be used with update-alternatives, we have +# to get rid of the old binary resulting from the non-update-alternativies-ified package: +[[ ! -L %{_bindir}/sphinx-apidoc ]] && rm -f %{_bindir}/sphinx-apidoc +[[ ! -L %{_bindir}/sphinx-build ]] && rm -f %{_bindir}/sphinx-build +[[ ! -L %{_bindir}/sphinx-autogen ]] && rm -f %{_bindir}/sphinx-autogen +[[ ! -L %{_bindir}/sphinx-quickstart ]] && rm -f %{_bindir}/sphinx-quickstart +[[ ! -L %{_mandir}/man1/sphinx-all.1.gz ]] && rm -f %{_mandir}/man1/sphinx-all.1.gz +[[ ! -L %{_mandir}/man1/sphinx-apidoc.1.gz ]] && rm -f %{_mandir}/man1/sphinx-apidoc.1.gz +[[ ! -L %{_mandir}/man1/sphinx-build.1.gz ]] && rm -f %{_mandir}/man1/sphinx-build.1.gz +[[ ! -L %{_mandir}/man1/sphinx-quickstart.1.gz ]] && rm -f %{_mandir}/man1/sphinx-quickstart.1.gz +exit 0 %post update-alternatives \ - --install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py3_ver} 10 \ + --install %{_bindir}/sphinx-apidoc sphinx-apidoc %{_bindir}/sphinx-apidoc-%{py3_ver} 30 \ --slave %{_bindir}/sphinx-build sphinx-build %{_bindir}/sphinx-build-%{py3_ver} \ --slave %{_bindir}/sphinx-autogen sphinx-autogen %{_bindir}/sphinx-autogen-%{py3_ver} \ --slave %{_bindir}/sphinx-quickstart sphinx-quickstart %{_bindir}/sphinx-quickstart-%{py3_ver} \ @@ -113,7 +128,7 @@ --slave %{_mandir}/man1/sphinx-build.1.gz sphinx-build.1 %{_mandir}/sphinx-build-%{py3_ver}.1.gz \ --slave %{_mandir}/man1/sphinx-quickstart.1.gz sphinx-quickstart.1 %{_mandir}/sphinx-quickstart-%{py3_ver}.1.gz \ -%postun +%preun if [ $1 -eq 0 ] ; then update-alternatives --remove sphinx-build %{_bindir}/sphinx-apidoc-%{py3_ver} fi -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
