Browse Source

check only the major version

master
parent
commit
47cf7a606f
  1. 6
      postgresql/postgresql.spec

6
postgresql/postgresql.spec

@ -298,11 +298,11 @@ PreReq: python
-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_old_maj=`echo "$v_old_all" | sed -e 's/^\([0-9]*\)\..*/\1/'`
v_new_all="%{V_postgresql}"
v_new_maj=`echo "$v_new_all" | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
v_new_maj=`echo "$v_new_all" | sed -e 's/^\([0-9]*\)\..*/\1/'`
if [ ".$v_old_maj" != ".$v_new_maj" ]; then
( echo "You are upgrading from PostgreSQL $v_old_all to PostgresSQL $v_new_all,"
( echo "You are upgrading from PostgreSQL $v_old_maj to PostgresSQL $v_new_maj,"
echo "which is a major version change. We expect a database incompatibility,"
echo "so a full database backup and restore is required!"
) | %{l_rpmtool} msg -b -t notice

Loading…
Cancel
Save