Accepting request 545144 from home:darix:branches:server:database:postgresql

- instead of hardcoding version 10, just check if the prio is
  smaller than 80.

- simplify the postgresql-install-alternatives to only require the
  pg version and go from there.
  supported calls of the script are:
  /usr/share/postgresql/install-alternatives postgresqlXY
  /usr/share/postgresql/install-alternatives XY
  where XY can currently be: 92 93 94 95 96 10

OBS-URL: https://build.opensuse.org/request/show/545144
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=97
This commit is contained in:
Reinhard Max 2017-11-24 12:45:09 +00:00 committed by Git OBS Bridge
parent 3eac0cf988
commit 15a35fecca
2 changed files with 31 additions and 4 deletions

View File

@ -2,13 +2,22 @@
shopt -s nullglob
if test "$#" -ne 2; then
echo "usage: $0 basedir priority" 1>&2
if test "$#" -ne 1; then
echo "usage: $0 pgversion" 1>&2
exit 1
fi
PGBASEDIR=$1
PRIO=$2
PRIO=$1
case "$PRIO" in
postgresql*)
PRIO="${PRIO##postgresql}"
;;
esac
PGBASEDIR=/usr/lib/postgresql$PRIO
if [ $PRIO -lt 80 ] ; then
PRIO="${PRIO}0"
fi
PGBINDIR=$PGBASEDIR/bin

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Nov 24 11:24:09 UTC 2017 - mrueckert@suse.de
- instead of hardcoding version 10, just check if the prio is
smaller than 80.
-------------------------------------------------------------------
Thu Nov 23 17:05:21 UTC 2017 - mrueckert@suse.de
- simplify the postgresql-install-alternatives to only require the
pg version and go from there.
supported calls of the script are:
/usr/share/postgresql/install-alternatives postgresqlXY
/usr/share/postgresql/install-alternatives XY
where XY can currently be: 92 93 94 95 96 10
-------------------------------------------------------------------
Wed Nov 22 13:03:42 UTC 2017 - max@suse.com