Dear maintainer

I've just uploaded the attached NMU to close both #1148802 and #1149461.

regards
Stuart


--
Stuart Prescott   http://www.nanonanonano.net/ [email protected]
Debian Developer  http://www.debian.org/       [email protected]
GPG fingerprint   90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
diff -Nru pyopencl-2025.1/debian/changelog pyopencl-2025.1/debian/changelog
--- pyopencl-2025.1/debian/changelog    2025-10-18 12:15:04.000000000 +1100
+++ pyopencl-2025.1/debian/changelog    2026-11-15 12:48:58.000000000 +1100
@@ -1,3 +1,13 @@
+pyopencl (2025.1-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Cherry-pick upstream changes to only give absolute paths when testing
+    XDG_CACHE_HOME
+    - fixes autopkgtests (Closes: #1148802).
+    - fixes FTBFS (Closes: #1149461).
+
+ -- Stuart Prescott <[email protected]>  Sun, 15 Nov 2026 12:48:58 +1100
+
 pyopencl (2025.1-2) unstable; urgency=medium
 
   [ Andreas Beckmann ]
diff -Nru pyopencl-2025.1/debian/.gitignore pyopencl-2025.1/debian/.gitignore
--- pyopencl-2025.1/debian/.gitignore   2025-10-18 12:15:04.000000000 +1100
+++ pyopencl-2025.1/debian/.gitignore   1970-01-01 10:00:00.000000000 +1000
@@ -1 +0,0 @@
-!*
diff -Nru 
pyopencl-2025.1/debian/patches/0005-Use-absolute-paths-for-XDG_CACHE_HOME.patch 
pyopencl-2025.1/debian/patches/0005-Use-absolute-paths-for-XDG_CACHE_HOME.patch
--- 
pyopencl-2025.1/debian/patches/0005-Use-absolute-paths-for-XDG_CACHE_HOME.patch 
    1970-01-01 10:00:00.000000000 +1000
+++ 
pyopencl-2025.1/debian/patches/0005-Use-absolute-paths-for-XDG_CACHE_HOME.patch 
    2026-11-15 12:48:58.000000000 +1100
@@ -0,0 +1,56 @@
+From: Stuart Prescott <[email protected]>
+Date: Sun, 15 Nov 2026 12:45:28 +1100
+Subject: Use absolute paths for XDG_CACHE_HOME
+
+Origin: https://github.com/inducer/pyopencl/pull/920
+Closes: #1148802, #1149461
+---
+ test/test_array.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/test_array.py b/test/test_array.py
+index 7ffa008..9d9b588 100644
+--- a/test/test_array.py
++++ b/test/test_array.py
+@@ -2346,8 +2346,8 @@ def test_logical_not(ctx_factory):
+                     reason="XDG_CACHE_HOME is not used on Windows")
+ def test_xdg_cache_home(ctx_factory):
+     import os
++    import pathlib
+     import shutil
+-    from os.path import join
+ 
+     context = ctx_factory()
+     queue = cl.CommandQueue(context)
+@@ -2355,13 +2355,13 @@ def test_xdg_cache_home(ctx_factory):
+     a = np.array([1, 2, 3, 4, 5]).astype(np.float32)
+     a_gpu = cl_array.to_device(queue, a)
+ 
+-    xdg_dir = "tmpdir_pyopencl_xdg_test"
++    xdg_dir = pathlib.Path("tmpdir_pyopencl_xdg_test").resolve()
+ 
+     # PyOpenCL uses pytools.PersistentDict for invoker caches,
+     # which is why xdg_dir will always exist. Therefore, check
+     # whether xdg_pyopencl_dir exists.
+-    xdg_pyopencl_dir = join(xdg_dir, "pyopencl")
+-    assert not os.path.exists(xdg_dir)
++    xdg_pyopencl_dir = xdg_dir / "pyopencl"
++    assert not xdg_dir.exists()
+ 
+     old_xdg_cache_home = None
+     old_characterize_has_src_build_cache = None
+@@ -2373,12 +2373,12 @@ def test_xdg_cache_home(ctx_factory):
+         cl.characterize.has_src_build_cache = lambda dev: False
+ 
+         old_xdg_cache_home = os.getenv("XDG_CACHE_HOME")
+-        os.environ["XDG_CACHE_HOME"] = xdg_dir
++        os.environ["XDG_CACHE_HOME"] = str(xdg_dir)
+ 
+         result = pow(a_gpu, a_gpu).get()
+         assert (np.abs(a ** a - result) < 3e-3).all()
+ 
+-        assert os.path.exists(xdg_pyopencl_dir)
++        assert xdg_pyopencl_dir.exists()
+     finally:
+         cl.characterize.has_src_build_cache = \
+             old_characterize_has_src_build_cache
diff -Nru pyopencl-2025.1/debian/patches/series 
pyopencl-2025.1/debian/patches/series
--- pyopencl-2025.1/debian/patches/series       2025-10-18 12:15:04.000000000 
+1100
+++ pyopencl-2025.1/debian/patches/series       2026-11-15 12:48:58.000000000 
+1100
@@ -2,3 +2,4 @@
 import-sphinxconfig.patch
 docs.patch
 python3.patch
+0005-Use-absolute-paths-for-XDG_CACHE_HOME.patch

Reply via email to