Make it easier to read update-alternatives

This commit is contained in:
Andreas Schneider 2017-06-12 13:59:12 +02:00
parent 3644aabc73
commit 2fd8e84d89

View File

@ -955,17 +955,27 @@ fi
%posttrans -n libwbclient %posttrans -n libwbclient
# It has to be posttrans here to make sure all files of a previous version # It has to be posttrans here to make sure all files of a previous version
# without alternatives support are removed # without alternatives support are removed
%{_sbindir}/update-alternatives --install %{_libdir}/libwbclient.so.%{libwbc_alternatives_version} \ %{_sbindir}/update-alternatives \
libwbclient.so.%{libwbc_alternatives_version}%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so.%{libwbc_alternatives_version} 10 --install \
%{_libdir}/libwbclient.so.%{libwbc_alternatives_version} \
libwbclient.so.%{libwbc_alternatives_version}%{libwbc_alternatives_suffix} \
%{_libdir}/samba/wbclient/libwbclient.so.%{libwbc_alternatives_version} \
10
/sbin/ldconfig /sbin/ldconfig
%preun -n libwbclient %preun -n libwbclient
%{_sbindir}/update-alternatives --remove libwbclient.so.%{libwbc_alternatives_version}%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so.%{libwbc_alternatives_version} %{_sbindir}/update-alternatives \
--remove \
libwbclient.so.%{libwbc_alternatives_version}%{libwbc_alternatives_suffix} \
%{_libdir}/samba/wbclient/libwbclient.so.%{libwbc_alternatives_version}
/sbin/ldconfig /sbin/ldconfig
%posttrans -n libwbclient-devel %posttrans -n libwbclient-devel
%{_sbindir}/update-alternatives --install %{_libdir}/libwbclient.so \ %{_sbindir}/update-alternatives \
libwbclient.so%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so 10 --install %{_libdir}/libwbclient.so \
libwbclient.so.0 \
%{_libdir}/samba/wbclient/libwbclient.so \
10
%preun -n libwbclient-devel %preun -n libwbclient-devel
# alternatives checks if the file which should be removed is a link or not, but # alternatives checks if the file which should be removed is a link or not, but