]> granicus.if.org Git - postgis/commitdiff
[run_test.pl] Do not assume OPT_UPGRADE_FROM was given
authorSandro Santilli <strk@kbt.io>
Fri, 19 Jan 2018 22:43:55 +0000 (22:43 +0000)
committerSandro Santilli <strk@kbt.io>
Fri, 19 Jan 2018 22:43:55 +0000 (22:43 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16343 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index e720f335c48109bb74d1a70ed462e5f6bae800e3..9de58cf3b05c60f3ae299c158fec35c1caeb334e 100755 (executable)
@@ -1325,7 +1325,7 @@ sub prepare_spatial_extensions
                                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 @@ sub upgrade_spatial_extensions
                        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