From 06cfbc3462c1afaac55b29b56290aea2536c62c68d15a39c6c9cbb0911213b1a Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 25 Feb 2019 15:10:48 +0000 Subject: [PATCH] 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 --- postgresql.changes | 12 ++++++++++++ postgresql.spec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/postgresql.changes b/postgresql.changes index 9e040e0..74ff649 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Feb 22 07:46:53 UTC 2019 - Franck Bui + +- 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 diff --git a/postgresql.spec b/postgresql.spec index 28dcd2e..058310e 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -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