Accepting request 919778 from home:schubi2

Fixed spec file regarding removing old update-alternatives entries.

OBS-URL: https://build.opensuse.org/request/show/919778
OBS-URL: https://build.opensuse.org/package/show/Base:System/dbus-1?expand=0&rev=305
This commit is contained in:
Simon Lees 2021-09-18 01:10:28 +00:00 committed by Git OBS Bridge
parent cdb990ae1f
commit ae009a5b64
4 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 16 12:52:55 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Fixed spec file regarding removing old update-alternatives
entries.
-------------------------------------------------------------------
Wed Aug 4 10:04:12 UTC 2021 - Stefan Schubert <schubi@suse.de>

View File

@ -53,7 +53,6 @@ BuildRequires: pkgconfig(libsystemd) >= 209
BuildRequires: pkgconfig(x11)
%if %{with libalternatives}
Requires: alts
Requires(pre): update-alternatives
%else
Requires(post): update-alternatives
Requires(preun):update-alternatives
@ -122,7 +121,7 @@ EOF
%if %{with libalternatives}
%pre
# removing old update-alternatives entries
if [ "$1" > 0 ] ; then
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.x11
fi
%else

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 16 12:51:27 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Fixed spec file regarding removing old update-alternatives
entries.
-------------------------------------------------------------------
Wed Aug 4 10:03:46 UTC 2021 - Stefan Schubert <schubi@suse.de>

View File

@ -58,7 +58,6 @@ Requires(post): diffutils
Requires(pre): permissions
%if %{with libalternatives}
Requires: alts
Requires(pre): update-alternatives
%else
Requires(post): update-alternatives
Requires(preun):update-alternatives
@ -200,8 +199,8 @@ rm -Rf %{buildroot}%{_datadir}/doc/dbus
%service_add_pre dbus.service dbus.socket
%if %{with libalternatives}
# removing old update-alternatives entries
if [ "$1" > 0 ] ; then
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11
fi
%endif