[postgis-tickets] r17748 - [run_test.pl] Allow using postgis_extensions_upgrade from unpackaged
Sandro Santilli
strk at kbt.io
Wed Aug 21 12:28:00 PDT 2019
Author: strk
Date: 2019-08-21 00:28:00 -0700 (Wed, 21 Aug 2019)
New Revision: 17748
Modified:
trunk/regress/run_test.pl
Log:
[run_test.pl] Allow using postgis_extensions_upgrade from unpackaged
And warn when it cannot be used due to too old source version.
Modified: trunk/regress/run_test.pl
===================================================================
--- trunk/regress/run_test.pl 2019-08-20 22:02:28 UTC (rev 17747)
+++ trunk/regress/run_test.pl 2019-08-21 07:28:00 UTC (rev 17748)
@@ -1518,10 +1518,18 @@
{
if ( $OPT_UPGRADE_TO =~ /^:auto!/ )
{
- if ( ! semver_lessthan($OPT_UPGRADE_FROM, "2.5.0") )
+ my $from = $OPT_UPGRADE_FROM;
+ $from =~ s/^unpackaged//;
+ if ( ! $from || semver_lessthan($from, "2.5.0") )
{
$upgrade_via_function = 1;
}
+ else
+ {
+ print "WARNING: postgis_extensions_upgrade()".
+ " not available in version $from.".
+ " We'll use manual upgrade.\n";
+ }
}
$OPT_UPGRADE_TO = $defextver;
}
@@ -1595,7 +1603,7 @@
die;
}
}
- }
+ }
if ( $upgrade_via_function )
{
More information about the postgis-tickets
mailing list