Accepting request 678171 from home:fbui:branches:server:database:postgresql

- 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/678171
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=115
This commit is contained in:
Reinhard Max 2019-02-25 15:10:48 +00:00 committed by Git OBS Bridge
parent affb1eeb43
commit 06cfbc3462
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 22 07:46:53 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.
-------------------------------------------------------------------
Tue Feb 19 16:05:22 UTC 2019 - Reinhard Max <max@suse.com>

View File

@ -312,7 +312,7 @@ getent passwd postgres > /dev/null ||
# Save the "enabled" and "active" state across the transition of
# ownership of postgresql.service from postgresql-init to
# postgresql-server.
if [ "$FIRST_ARG" -ge 1 ]; then \
if [ $1 -ge 1 ]; then \
if [ x$(systemctl is-enabled postgresql.service 2>/dev/null ||:) = "xenabled" ]; then
touch %eflag
fi