[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.2-21-gf1ad2485e

git at osgeo.org git at osgeo.org
Fri Aug 12 12:43:54 PDT 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.2 has been updated
       via  f1ad2485e2e54989ae84513e5ad75fe1e8e82b23 (commit)
      from  632618a14db381ca5b08a0ca0819ee42233fda3d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f1ad2485e2e54989ae84513e5ad75fe1e8e82b23
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Aug 12 21:40:51 2022 +0200

    run_test: don't try to handle raster split when coming from unpackaged
    
    References #5213 in stable-3.2 branch (3.2.3dev)

diff --git a/regress/run_test.pl b/regress/run_test.pl
index 8e1016e53..87fb1e50f 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -1664,41 +1664,28 @@ sub upgrade_spatial_extensions
       die;
     }
 
-    # Handle raster split if coming from pre-split and going
-    # to splitted raster
-    if ( $OPT_UPGRADE_FROM && has_split_raster_ext($OPT_UPGRADE_TO) &&
+    # Handle raster split if coming from pre-split extension
+    # and going to splitted raster
+    if ( $OPT_UPGRADE_FROM &&
+         ! $OPT_UPGRADE_FROM =~ /^unpackaged/ &&
+         has_split_raster_ext($OPT_UPGRADE_TO) &&
          ! has_split_raster_ext($OPT_UPGRADE_FROM) )
     {
-      if ( $OPT_WITH_RASTER )
-      {
-        # upgrade of postgis must have unpackaged raster, so
-        # we create it again here
-				my $sql = package_extension_sql('postgis_raster', ${nextver});
+      # upgrade of postgis must have unpackaged raster, so
+      # we create it again here
+      my $sql = package_extension_sql('postgis_raster', ${nextver});
 
-        print "Upgrading PostGIS Raster in '${DB}' using: ${sql}\n" ;
+      print "Packaging PostGIS Raster in '${DB}' using: ${sql}\n" ;
 
-        my $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";
-        my $rv = system($cmd);
-        if ( $rv ) {
-          fail "Error encountered creating EXTENSION POSTGIS_RASTER from unpackaged on upgrade", $REGRESS_LOG;
-          die;
-        }
+      my $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";
+      my $rv = system($cmd);
+      if ( $rv ) {
+        fail "Error encountered creating EXTENSION POSTGIS_RASTER from unpackaged on upgrade", $REGRESS_LOG;
+        die;
       }
-      else
-      {
-        # Raster support was not requested, so drop it if
-        # left unpackaged
-        print "Packaging PostGIS Raster in '${DB}' for later drop using: ${sql}\n" ;
-
-				$sql = package_extension_sql('postgis_raster', ${nextver});
-
-        $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";
-        $rv = system($cmd);
-        if ( $rv ) {
-          fail "Error encountered creating EXTENSION POSTGIS_RASTER from unpackaged on upgrade", $REGRESS_LOG;
-          die;
-        }
 
+      if ( ! $OPT_WITH_RASTER )
+      {
         print "Dropping PostGIS Raster in '${DB}' using: ${sql}\n" ;
 
         $sql = "DROP EXTENSION postgis_raster";

-----------------------------------------------------------------------

Summary of changes:
 regress/run_test.pl | 45 ++++++++++++++++-----------------------------
 1 file changed, 16 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list