OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 24-Jan-2003 17:17:44
Branch: HEAD Handle: 2003012416174300
Modified files:
openpkg-src/postgresql postgresql.spec
Log:
fix updating scripts
Summary:
Revision Changes Path
1.34 +5 -6 openpkg-src/postgresql/postgresql.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/postgresql/postgresql.spec
============================================================================
$ cvs diff -u -r1.33 -r1.34 postgresql.spec
--- openpkg-src/postgresql/postgresql.spec 24 Jan 2003 14:34:39 -0000 1.33
+++ openpkg-src/postgresql/postgresql.spec 24 Jan 2003 16:17:43 -0000 1.34
@@ -282,15 +282,15 @@
rm -rf $RPM_BUILD_ROOT
%pre
- if [ $1 -eq 1 ]; then
- # initial installation
+ if [ $1 -gt 1 ]; then
+ # upgrading of installation
if [ -f $RPM_INSTALL_PREFIX/var/postgresql/db/PG_VERSION -a \
-f $RPM_INSTALL_PREFIX/bin/pg_migrate ]; then
# database migration dumping hint
v_old_all=`cat $RPM_INSTALL_PREFIX/var/postgresql/db/PG_VERSION`
v_old_maj=`echo "$v_old_all" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
v_new_all="%{V_postgresql}"
- v_new_maj=`echo "$v_new_maj" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
+ v_new_maj=`echo "$v_new_all" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
if [ ".$v_old_maj" != ".$v_new_maj" ]; then
if [ ! -f $RPM_INSTALL_PREFIX/var/postgresql/db.dump.sql.bz2 -a
".$PG_MIGRATE" != .ignore ]; then
( echo "You are upgrading from PostgreSQL $v_old_all to
PostgresSQL $v_new_all,"
@@ -306,8 +306,6 @@
fi
fi
fi
- elif [ $1 -gt 1 ]; then
- # upgrading of installation
rm -f $RPM_INSTALL_PREFIX/var/posgresql/RESTART >/dev/null 2>&1 || true
if [ ".`$l_prefix/etc/rc postgresql status 2>&1 | grep 'is running'`" != .
]; then
echo "Shutting down currently running database engine." | %{l_rpmtool}
msg -b -t notice
@@ -360,6 +358,7 @@
) $RPM_INSTALL_PREFIX/bin/odbcinst -i -d -r
%endif
elif [ $1 -gt 1 ]; then
+ # upgrading of installation
if [ -f $RPM_INSTALL_PREFIX/var/posgresql/RESTART ]; then
echo "Starting database engine again." | %{l_rpmtool} msg -b -t notice
$RPM_INSTALL_PREFIX/etc/rc postgresql start
@@ -371,7 +370,7 @@
v_old_all=`cat $RPM_INSTALL_PREFIX/var/postgresql/db/PG_VERSION`
v_old_maj=`echo "$v_old_all" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
v_new_all="%{V_postgresql}"
- v_new_maj=`echo "$v_new_maj" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
+ v_new_maj=`echo "$v_new_all" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
if [ ".$v_old_maj" != ".$v_new_maj" ]; then
( echo "You upgraded from PostgreSQL $v_old_all to PostgresSQL
$v_new_all,"
echo "which is a major version upgrade. We expect a database
incompatibility,"
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]