[SCM] PostGIS branch master updated. 3.7.0beta1-107-g60581a9b31
git at osgeo.org
git at osgeo.org
Mon Jul 27 23:07:02 PDT 2026
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 60581a9b317dc64aad80b701755d271658f41f02 (commit)
via 23be1accf8d11bd88034b82ba0688801ad3e9328 (commit)
from a25c0220917fa7eb483fece0a94f93b5caf333a0 (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 60581a9b317dc64aad80b701755d271658f41f02
Merge: a25c022091 23be1accf8
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Mon Jul 27 23:07:00 2026 -0700
Merge pull request 'ci: tolerate missing TMPDIR in upgrade check' (!581) from Komzpa/postgis:codex/trac-6099-tmpdir-fallback into master
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/581
commit 23be1accf8d11bd88034b82ba0688801ad3e9328
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Tue Jul 28 05:54:15 2026 +0400
ci: tolerate missing TMPDIR in upgrade check
diff --git a/utils/check_create_upgrade_replaced_function_errors.sh b/utils/check_create_upgrade_replaced_function_errors.sh
index 321c7f917e..4764f06334 100644
--- a/utils/check_create_upgrade_replaced_function_errors.sh
+++ b/utils/check_create_upgrade_replaced_function_errors.sh
@@ -2,7 +2,11 @@
set -e
-TMPDIR="$(mktemp -d "${TMPDIR:-/tmp}/check_create_upgrade_replaced_function_errors.XXXXXX")"
+tmp_parent="${TMPDIR:-/tmp}"
+if ! test -d "${tmp_parent}"; then
+ tmp_parent="/tmp"
+fi
+TMPDIR="$(mktemp -d "${tmp_parent}/check_create_upgrade_replaced_function_errors.XXXXXX")"
trap 'rm -rf "${TMPDIR}"' EXIT
cat > "${TMPDIR}/postgis.sql" <<'SQL'
diff --git a/utils/test_check_create_upgrade_replaced_function_errors.py b/utils/test_check_create_upgrade_replaced_function_errors.py
new file mode 100644
index 0000000000..1f1e262258
--- /dev/null
+++ b/utils/test_check_create_upgrade_replaced_function_errors.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+
+import os
+import shutil
+import subprocess
+import tempfile
+import unittest
+from pathlib import Path
+
+
+SCRIPT = Path(__file__).with_name("check_create_upgrade_replaced_function_errors.sh")
+
+
+class CreateUpgradeReplacedFunctionErrorsTest(unittest.TestCase):
+ def test_missing_tmpdir_parent_falls_back_to_system_temp(self):
+ shell = shutil.which("sh")
+ if shell is None:
+ self.skipTest("test requires a POSIX sh on PATH")
+
+ with tempfile.TemporaryDirectory() as temporary_directory:
+ missing_tmpdir = Path(temporary_directory) / "missing" / "tmp"
+ environment = os.environ.copy()
+ environment["TMPDIR"] = str(missing_tmpdir)
+ environment["srcdir"] = str(SCRIPT.parent)
+
+ result = subprocess.run(
+ [shell, str(SCRIPT)],
+ cwd=SCRIPT.parent,
+ env=environment,
+ text=True,
+ capture_output=True,
+ )
+
+ self.assertEqual(0, result.returncode, result.stdout + result.stderr)
+
+
+if __name__ == "__main__":
+ unittest.main()
-----------------------------------------------------------------------
Summary of changes:
...heck_create_upgrade_replaced_function_errors.sh | 6 +++-
...heck_create_upgrade_replaced_function_errors.py | 38 ++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 utils/test_check_create_upgrade_replaced_function_errors.py
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list