Hello community,

here is the log from the commit of package python-testrepository for 
openSUSE:Factory checked in at 2014-02-26 06:55:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testrepository (Old)
 and      /work/SRC/openSUSE:Factory/.python-testrepository.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-testrepository"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-testrepository/python-testrepository.changes  
    2014-01-30 12:52:32.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-testrepository.new/python-testrepository.changes
 2014-02-26 06:55:39.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Feb 13 13:56:39 UTC 2014 - speili...@suse.com
+
+- Implement update-alternatives
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-testrepository.spec ++++++
--- /var/tmp/diff_new_pack.Mxnj3M/_old  2014-02-26 06:55:41.000000000 +0100
+++ /var/tmp/diff_new_pack.Mxnj3M/_new  2014-02-26 06:55:41.000000000 +0100
@@ -28,15 +28,17 @@
 BuildRequires:  python-extras
 BuildRequires:  python-fixtures
 BuildRequires:  python-python-mimeparse
-BuildRequires:  python-python-subunit
+BuildRequires:  python-python-subunit >= 0.0.10
 BuildRequires:  python-setuptools
 BuildRequires:  python-testscenarios
-BuildRequires:  python-testtools
+BuildRequires:  python-testtools >= 0.9.30
 Requires:       python-extras
 Requires:       python-fixtures
 Requires:       python-python-subunit >= 0.0.10
 Requires:       python-testscenarios
 Requires:       python-testtools >= 0.9.30
+Requires(post): 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()")}
@@ -59,20 +61,37 @@
 
 %prep
 %setup -q -n testrepository-%{version}
+sed -i -e "s|testr = |testr-%{py_ver} = |" \
+       -e "s|'testr'|'testr-%{py_ver}'|" setup.py
+mv testr testr-%{py_ver}
 
 %build
 python setup.py build
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+touch %{buildroot}%{_sysconfdir}/alternatives/testr
+ln -sf %{_sysconfdir}/alternatives/testr %{buildroot}/%{_bindir}/testr
 
 %check
 python setup.py test
 
+%post
+update-alternatives \
+    --install %{_bindir}/testr testr %{_bindir}/testr-%{py_ver} 20
+
+%postun
+if [ $1 -eq 0 ] ; then
+    update-alternatives --remove testr %{_bindir}/testr-%{py_ver}
+fi
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING NEWS README.txt BSD
 %{_bindir}/testr
+%{_bindir}/testr-%{py_ver}
+%ghost %{_sysconfdir}/alternatives/testr
 %{python_sitelib}/*
 
 %changelog

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to