[postgis-tickets] r16343 - [run_test.pl] Do not assume OPT_UPGRADE_FROM was given

Sandro Santilli strk at kbt.io
Fri Jan 19 02:43:55 PST 2018


Author: strk
Date: 2018-01-19 14:43:55 -0800 (Fri, 19 Jan 2018)
New Revision: 16343

Modified:
   trunk/regress/run_test.pl
Log:
[run_test.pl] Do not assume OPT_UPGRADE_FROM was given

Modified: trunk/regress/run_test.pl
===================================================================
--- trunk/regress/run_test.pl	2018-01-19 17:52:33 UTC (rev 16342)
+++ trunk/regress/run_test.pl	2018-01-19 22:43:55 UTC (rev 16343)
@@ -1325,7 +1325,7 @@
 				if ( semver_lessthan($OPT_UPGRADE_FROM, "2.2.0") )
 				{
 					print "NOTICE: skipping SFCGAL extension create "
-							. "as not available in version $OPT_UPGRADE_FROM\n";
+							. "as not available in version '$OPT_UPGRADE_FROM'\n";
 					last;
 				}
 				$sql .= " VERSION '" . $OPT_UPGRADE_FROM . "'";
@@ -1493,10 +1493,10 @@
 			if ( $OPT_UPGRADE_FROM eq "unpackaged" ) {
 				$sql = "CREATE EXTENSION postgis_sfcgal VERSION '${nextver}' FROM unpackaged";
 			}
-			elsif ( semver_lessthan($OPT_UPGRADE_FROM, "2.2.0") )
+			elsif ( $OPT_UPGRADE_FROM && semver_lessthan($OPT_UPGRADE_FROM, "2.2.0") )
 			{
 				print "NOTICE: installing SFCGAL extension on upgrade "
-						. "as it was not available in version $OPT_UPGRADE_FROM\n";
+						. "as it was not available in version '$OPT_UPGRADE_FROM'\n";
 				$sql = "CREATE EXTENSION postgis_sfcgal VERSION '${nextver}'";
 			}
 			else



More information about the postgis-tickets mailing list