Accepting request 678161 from home:fbui:branches:Base:System

- Drop use of $FIRST_ARG in .spec
  The use of $FIRST_ARG was probably required because of the
  %service_* rpm macros were playing tricks with the shell positional
  parameters. This is bad practice and error prones so let's assume
  that no macros should do that anymore and hence it's safe to assume
  that positional parameters remains unchanged after any rpm macro
  call.

OBS-URL: https://build.opensuse.org/request/show/678161
OBS-URL: https://build.opensuse.org/package/show/Base:System/dbus-1?expand=0&rev=279
This commit is contained in:
Simon Lees 2019-02-22 08:13:10 +00:00 committed by Git OBS Bridge
parent 2cce4e930f
commit 3aec557a5c
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 22 06:58:00 UTC 2019 - Franck Bui <fbui@suse.com>
- Drop use of $FIRST_ARG in .spec
The use of $FIRST_ARG was probably required because of the
%service_* rpm macros were playing tricks with the shell positional
parameters. This is bad practice and error prones so let's assume
that no macros should do that anymore and hence it's safe to assume
that positional parameters remains unchanged after any rpm macro
call.
-------------------------------------------------------------------
Wed Jan 30 13:03:19 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 22 06:58:00 UTC 2019 - Franck Bui <fbui@suse.com>
- Drop use of $FIRST_ARG in .spec
The use of $FIRST_ARG was probably required because of the
%service_* rpm macros were playing tricks with the shell positional
parameters. This is bad practice and error prones so let's assume
that no macros should do that anymore and hence it's safe to assume
that positional parameters remains unchanged after any rpm macro
call.
-------------------------------------------------------------------
Wed Jan 30 13:03:19 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -233,7 +233,7 @@ getent passwd messagebus >/dev/null || \
# removed reletavly soon.
# Get the current version
if [ "$FIRST_ARG" -gt 1 ]; then
if [ $1 -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