1
0

Accepting request 419482 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/419482
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-dulwich?expand=0&rev=18
This commit is contained in:
Dominique Leuenberger 2016-08-17 10:05:35 +00:00 committed by Git OBS Bridge
parent c16ad319b6
commit a4cbcfa6d3
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
- Fix update-alternatives implementation.
-------------------------------------------------------------------
Thu Jan 14 10:19:50 UTC 2016 - toddrme2178@gmail.com

View File

@ -29,7 +29,7 @@ BuildRequires: fdupes
BuildRequires: python-Sphinx
BuildRequires: python-devel
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(preun): update-alternatives
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
@ -53,21 +53,19 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for p in dulwich dul-receive-pack dul-upload-pack ; do
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
# create a dummy target for /etc/alternatives/$p
touch %{buildroot}%{_sysconfdir}/alternatives/$p
done
%fdupes %{buildroot}
%post
"%_sbindir/update-alternatives" \
%_sbindir/update-alternatives \
--install %{_bindir}/dulwich dulwich %{_bindir}/dulwich-%{py_ver} 30 \
--slave %{_bindir}/dul-receive-pack dul-receive-pack %{_bindir}/dul-receive-pack-%{py_ver} \
--slave %{_bindir}/dul-upload-pack dul-upload-pack %{_bindir}/dul-upload-pack-%{py_ver}
%postun
%preun
if [ $1 -eq 0 ] ; then
"%_sbindir/update-alternatives" --remove dulwich %{_bindir}/dulwich-%{py_ver}
%_sbindir/update-alternatives --remove dulwich %{_bindir}/dulwich-%{py_ver}
fi
%files