Hello community, here is the log from the commit of package python-jsonpatch for openSUSE:Factory checked in at 2016-08-17 12:05:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jsonpatch (Old) and /work/SRC/openSUSE:Factory/.python-jsonpatch.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonpatch" Changes: -------- --- /work/SRC/openSUSE:Factory/python-jsonpatch/python-jsonpatch.changes 2015-06-24 20:50:54.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-jsonpatch.new/python-jsonpatch.changes 2016-08-17 12:05:45.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Aug 15 14:51:56 UTC 2016 - [email protected] + +- Fix update-alternatives implementation. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jsonpatch.spec ++++++ --- /var/tmp/diff_new_pack.xb3HD9/_old 2016-08-17 12:05:47.000000000 +0200 +++ /var/tmp/diff_new_pack.xb3HD9/_new 2016-08-17 12:05:47.000000000 +0200 @@ -28,8 +28,7 @@ BuildRequires: python-jsonpointer Requires: python-jsonpointer >= 1.9 Requires(post): update-alternatives -Requires(postun): update-alternatives -Requires(pre): coreutils +Requires(preun): 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()")} @@ -49,31 +48,32 @@ %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} -for i in patch diff; do - mv %{buildroot}%{_bindir}/json$i %{buildroot}%{_bindir}/json$i-%{py_ver} - ln -s %{_bindir}/json$i-%{py_ver} %{buildroot}%{_bindir}/json$i -done -%pre -[ -h %{_bindir}/jsonpatch ] || rm -f %{_bindir}/jsonpatch -[ -h %{_bindir}/jsondiff ] || rm -f %{_bindir}/jsondiff +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +for p in jsonpatch jsondiff ; do + mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver} + ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p +done %post -update-alternatives --install \ - %{_bindir}/jsonpatch jsonpatch %{_bindir}/jsonpatch-%{py_ver} 20 \ +%_sbindir/update-alternatives \ + --install %{_bindir}/jsonpatch jsonpatch %{_bindir}/jsonpatch-%{py_ver} 20 \ --slave %{_bindir}/jsondiff jsondiff %{_bindir}/jsondiff-%{py_ver} %preun if [ $1 -eq 0 ] ; then - update-alternatives --remove jsonpatch %{_bindir}/jsonpatch-%{py_ver} + %_sbindir/update-alternatives --remove jsonpatch %{_bindir}/jsonpatch-%{py_ver} fi %files %defattr(-,root,root,-) -%ghost %{_bindir}/jsonpatch -%{_bindir}/jsonpatch-%{py_ver} -%ghost %{_bindir}/jsondiff +%{_bindir}/jsondiff +%{_bindir}/jsonpatch %{_bindir}/jsondiff-%{py_ver} +%{_bindir}/jsonpatch-%{py_ver} +%ghost %{_sysconfdir}/alternatives/jsondiff +%ghost %{_sysconfdir}/alternatives/jsonpatch %{python_sitelib}/jsonpatch* %changelog
