Hello community,

here is the log from the commit of package python-chardet for openSUSE:Factory 
checked in at 2015-05-19 23:42:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-chardet (Old)
 and      /work/SRC/openSUSE:Factory/.python-chardet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-chardet"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-chardet/python-chardet.changes    
2015-02-18 12:08:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-chardet.new/python-chardet.changes       
2015-05-19 23:42:18.000000000 +0200
@@ -1,0 +2,7 @@
+Mon May 11 05:49:58 UTC 2015 - a...@gmx.de
+
+- specfile:
+  * added update alternative to prevent conflicts with python3 version
+  * add tests
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-chardet.spec ++++++
--- /var/tmp/diff_new_pack.HHH3Ol/_old  2015-05-19 23:42:19.000000000 +0200
+++ /var/tmp/diff_new_pack.HHH3Ol/_new  2015-05-19 23:42:19.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-chardet
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,8 @@
 Source1:        python-chardet-rpmlintrc
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version} > 1110
 BuildArch:      noarch
@@ -69,10 +71,28 @@
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+# update-alternatives
+mv %{buildroot}%{_bindir}/chardetect 
%{buildroot}%{_bindir}/chardetect-%{py_ver}
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+touch %{buildroot}%{_sysconfdir}/alternatives/chardetect
+ln -sf %{_sysconfdir}/alternatives/chardetect %{buildroot}%{_bindir}/chardetect
+
+%check
+python setup.py test
+
+%post
+   update-alternatives --install %{_bindir}/chardetect chardetect 
%{_bindir}/chardetect-%{py_ver} 30
+
+%postun
+if [ $1 -eq 0 ] ; then
+    update-alternatives --remove chardetect %{_bindir}/chardetect-%{py_ver}
+fi
 
 %files
 %defattr(-,root,root,-)
 %{python_sitelib}/*
 %{_bindir}/chardetect
+%{_bindir}/chardetect-%{py_ver}
+%ghost %{_sysconfdir}/alternatives/chardetect
 
 %changelog


Reply via email to