aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-12 06:14:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-12 06:14:31 +0000
commit2afa824ca873539815ad602a77b1da4890f13a55 (patch)
tree7017c9ca16eaa3e9dadbe854fb98fb840a64d2ac
parentd822dbef6a93b82f5d0e4e25b0abd2e8a18e53d0 (diff)
downloadaports-2afa824ca873539815ad602a77b1da4890f13a55.tar.bz2
aports-2afa824ca873539815ad602a77b1da4890f13a55.tar.xz
main/postgresql: update pre-upgrade script
-rw-r--r--main/postgresql/APKBUILD2
-rw-r--r--main/postgresql/postgresql.pre-upgrade11
2 files changed, 7 insertions, 6 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index f90ae1a240..5bb39415e1 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postgresql
pkgver=9.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="A sophisticated object-relational DBMS"
url="http://www.postgresql.org/"
arch="all"
diff --git a/main/postgresql/postgresql.pre-upgrade b/main/postgresql/postgresql.pre-upgrade
index 989e021673..bcdedaac88 100644
--- a/main/postgresql/postgresql.pre-upgrade
+++ b/main/postgresql/postgresql.pre-upgrade
@@ -1,11 +1,12 @@
#!/bin/sh
-
new="$1"
old="$2"
-compare=$(apk version -t "$old" 8.4)
-# check if we upgrade from earlier than 8.4 and if it is running
+pgver=${new%*.}
+compare=$(apk version -t "$old" $pgver)
+
+# check if we upgrade from earlier than $pgver and if it is running
if [ "$compare" != "<" ] || ! /etc/init.d/postgresql --quiet status; then
exit 0
fi
@@ -15,8 +16,8 @@ if [ -f /etc/conf.d/postgresql ]; then
fi
cat <<EOF
-* You are upgrading to postgres 8.4 wich is not compatible with the running
-* See: http://www.postgresql.org/docs/8.4/interactive/install-upgrading.html
+* You are upgrading to postgres $pgver wich is not compatible with the running
+* See: http://www.postgresql.org/docs/$pgver/static/upgrading.html
*
* The corresponding steps for Alpine Linux is:
*