[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-638-g1cdfe9fa4

git at osgeo.org git at osgeo.org
Sun Feb 19 15:51:43 PST 2023


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, master has been updated
       via  1cdfe9fa401d65b839dbf2d131cd3bf92e12deef (commit)
      from  c2dbb220d05789dd4f4ae76b19071c2c742444ea (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 1cdfe9fa401d65b839dbf2d131cd3bf92e12deef
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Feb 20 00:50:51 2023 +0100

    run_test.pl: don't prepare target db restoring from ext based dump
    
    Closes #5343

diff --git a/regress/run_test.pl b/regress/run_test.pl
index f6384ab59..6afc54bd4 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -394,13 +394,21 @@ if ( $OPT_DUMPRESTORE )
         die;
     }
 
-    print "Creating spatial db '${DB}'\n";
-    undef($OPT_UPGRADE_FROM); # to directly prepare the target
-    $rv = create_spatial();
+    print "Creating db '${DB}'\n";
+    $rv = create_db();
     if ( ! $rv ) {
-        fail("Could not create spatial db ${DB}", $REGRESS_LOG);
+        fail("Could not create db ${DB}", $REGRESS_LOG);
         die;
     }
+
+    # Extension based spatial db do not need the target
+    # database to be prepared in any way, script based
+    # spatial db requires being prepared.
+    if ( not $OPT_EXTENSIONS )
+    {
+        die unless prepare_spatial();
+    }
+
     die unless restore_db($DBDUMP);
 
     unlink($DBDUMP);
@@ -1427,7 +1435,7 @@ sub count_postgis_objects
 sub create_db
 {
 	my $createcmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG";
-	return system($createcmd);
+	return not system($createcmd);
 }
 
 sub create_spatial

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

Summary of changes:
 regress/run_test.pl | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list