Accepting request 650572 from home:eeich:branches:Base:System
- Avoid ugly error message from %pre(install) script when installing for the first time. - Avoid ugly error message from %pre(install) script when installing for the first time. OBS-URL: https://build.opensuse.org/request/show/650572 OBS-URL: https://build.opensuse.org/package/show/Base:System/dbus-1?expand=0&rev=270
This commit is contained in:
parent
6f0289c92e
commit
79c8595d8b
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 23:37:09 UTC 2018 - eich@suse.com
|
||||
|
||||
- Avoid ugly error message from %pre(install) script when installing
|
||||
for the first time.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 22 10:40:43 UTC 2018 - sflees@suse.de
|
||||
- Update to 1.12.10
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 23:37:09 UTC 2018 - eich@suse.com
|
||||
|
||||
- Avoid ugly error message from %pre(install) script when installing
|
||||
for the first time.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 22 10:40:43 UTC 2018 - sflees@suse.de
|
||||
- Update to 1.12.10
|
||||
|
20
dbus-1.spec
20
dbus-1.spec
@ -229,23 +229,25 @@ getent passwd messagebus >/dev/null || \
|
||||
# removed reletavly soon.
|
||||
|
||||
# Get the current version
|
||||
CURRENT_VER=$(/usr/bin/dbus-daemon --version 2>/dev/null| sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/' | head -1)
|
||||
if [[ "$FIRST_ARG" -gt 1 ]]; then
|
||||
CURRENT_VER=$(/usr/bin/dbus-daemon --version 2>/dev/null| sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/' | head -1)
|
||||
|
||||
# If the current version is or less then 1.10.2 where this change was added then migration needs to be run
|
||||
# The following line will return 1.10.2 if its newer then the current version
|
||||
TEST_VER=$(printf "1.10.2\n$CURRENT_VER" | sort -Vr | head -1)
|
||||
TEST_VER=$(printf "1.10.2\n$CURRENT_VER" | sort -Vr | head -1)
|
||||
|
||||
if [[ "$FIRST_ARG" -gt 1 && $TEST_VER == "1.10.12" ]]; then
|
||||
if [[ -f /etc/sysconfig/services ]]; then
|
||||
cp -a /etc/sysconfig/services %{_backup}
|
||||
else
|
||||
touch %{_backup}
|
||||
fi
|
||||
cat >>/etc/sysconfig/services <<EOF
|
||||
if [[ $TEST_VER == "1.10.12" ]]; then
|
||||
if [[ -f /etc/sysconfig/services ]]; then
|
||||
cp -a /etc/sysconfig/services %{_backup}
|
||||
else
|
||||
touch %{_backup}
|
||||
fi
|
||||
cat >>/etc/sysconfig/services <<EOF
|
||||
# temporarily added by rpm update to avoid dbus service restart
|
||||
# backup saved in %{_backup}
|
||||
DISABLE_RESTART_ON_UPDATE="yes"
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
%post
|
||||
|
Loading…
Reference in New Issue
Block a user