[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-112-g1c0838e78

git at osgeo.org git at osgeo.org
Sat Sep 17 12:54:00 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, master has been updated
       via  1c0838e7899de623ef842fd2dd5b2cb29b84076b (commit)
      from  b3fcb2d8e0ae0a0e9f25393a035f9cb7367c704a (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 1c0838e7899de623ef842fd2dd5b2cb29b84076b
Author: Sandro Santilli <strk at kbt.io>
Date:   Sat Sep 17 21:51:28 2022 +0200

    Ask pg_extension_update_paths if an upgrade path is available
    
    Rather than making assumption about files on disk

diff --git a/utils/check_all_upgrades.sh b/utils/check_all_upgrades.sh
index 427234d8b..92012a988 100755
--- a/utils/check_all_upgrades.sh
+++ b/utils/check_all_upgrades.sh
@@ -176,9 +176,14 @@ for EXT in ${INSTALLED_EXTENSIONS}; do
       test_label="${test_label} ($to_version)"
     fi
     compatible_upgrade "${test_label}" ${from_version} ${to_version} || continue
-    UPGRADE_FILE="${EXT}--${from_version}--${to_version}.sql"
-    if ! test -e ${UPGRADE_FILE}; then
-      echo "SKIP: ${test_label} ($UPGRADE_FILE is missing)"
+    path=$( psql -XAtc "
+        SELECT path
+        FROM pg_catalog.pg_extension_update_paths('${EXT}')
+        WHERE source = '${from_version}'
+        AND target = '${to_version}'
+    " )
+    if test -z "${path}"; then
+      echo "SKIP: ${test_label} (no upgrade path from ${from_version} to ${to_version} known by postgresql)"
       continue
     fi
     echo "Testing ${test_label}"
@@ -199,9 +204,14 @@ for EXT in ${INSTALLED_EXTENSIONS}; do
       test_label="${test_label} ($to_version)"
     fi
     compatible_upgrade "${test_label}" ${majmin} ${to_version} || continue
-    UPGRADE_FILE="${EXT}--unpackaged--${to_version}.sql"
-    if ! test -e ${UPGRADE_FILE}; then
-      echo "SKIP: ${test_label} ($UPGRADE_FILE is missing)"
+    path=$( psql -XAtc "
+        SELECT path
+        FROM pg_catalog.pg_extension_update_paths('${EXT}')
+        WHERE source = 'unpackaged'
+        AND target = '${to_version}'
+    " )
+    if test -z "${path}"; then
+      echo "SKIP: ${test_label} (no upgrade path from unpackaged to ${to_version} known by postgresql)"
       continue
     fi
     echo "Testing ${test_label}"

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

Summary of changes:
 utils/check_all_upgrades.sh | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list