On 3/8/24 9:47 PM, Collin Funk wrote:
> These lines are fixed by this patch on my updated GNU/Linux machine. I
> saw another TODO item referencing a separate patch needed for
> test-driver distributed with a specific version of Automake. I'll get
> around that one in a bit, but I figured I'd mention it in case this
> test fails due to that issue.
Patch for this attached as promised.
Collin
From 9a17a6ddaab49f0b9e5c70421db97a5d5cd5d0af Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Fri, 8 Mar 2024 22:30:03 -0800
Subject: [PATCH 2/2] gnulib-tool.py: Follow gnulib-tool changes, part 49.
Follow gnulib-tool change
2021-08-07 Bruno Haible <br...@clisp.org>
gnulib-tool: Add support for Automake 1.16.4.
* pygnulib/GLTestDir.py (_patch_test_driver): If patching
build-aux/test-driver fails with build-aux/test-driver.diff try again
with build-aux/test-driver-1.16.3.diff.
---
ChangeLog | 10 ++++++++++
gnulib-tool.py.TODO | 16 ----------------
pygnulib/GLTestDir.py | 19 +++++++++++++------
3 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e46c53a176..ca39bbc532 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-03-08 Collin Funk <collin.fu...@gmail.com>
+
+ gnulib-tool.py: Follow gnulib-tool changes, part 49.
+ Follow gnulib-tool change
+ 2021-08-07 Bruno Haible <br...@clisp.org>
+ gnulib-tool: Add support for Automake 1.16.4.
+ * pygnulib/GLTestDir.py (_patch_test_driver): If patching
+ build-aux/test-driver fails with build-aux/test-driver.diff try again
+ with build-aux/test-driver-1.16.3.diff.
+
2024-03-08 Collin Funk <collin.fu...@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 48.
diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO
index 7632991780..7031462593 100644
--- a/gnulib-tool.py.TODO
+++ b/gnulib-tool.py.TODO
@@ -364,22 +364,6 @@ Date: Mon Dec 13 02:43:21 2021 +0100
--------------------------------------------------------------------------------
-commit 6ccfbd6495f2849b1aeea84f73327f6ced0080a7
-Author: Bruno Haible <br...@clisp.org>
-Date: Sun Aug 8 03:52:01 2021 +0200
-
- gnulib-tool: Add support for Automake 1.16.4.
-
- Reported by <shoober...@gmail.com> in
- <https://lists.gnu.org/archive/html/bug-libunistring/2021-08/msg00000.html>.
-
- * build-aux/test-driver-1.16.3.diff: Renamed from build-aux/test-driver.diff.
- * build-aux/test-driver.diff: Update to match Automake 1.16.4.
- * gnulib-tool (func_create_testdir, func_create_megatestdir): Try both
- .diff files.
-
---------------------------------------------------------------------------------
-
commit 4b071c115309079528db7b60e8d2ffb22b129088
Author: Paul Eggert <egg...@cs.ucla.edu>
Date: Mon Apr 26 23:31:29 2021 -0700
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index 5a4c38f049..b294dbd58b 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -60,13 +60,20 @@ normpath = os.path.normpath
def _patch_test_driver() -> None:
'''Patch the test-driver script in testdirs.'''
test_driver = joinpath('build-aux', 'test-driver')
- diff = joinpath(DIRS['root'], joinpath('build-aux', 'test-driver.diff'))
- command = f'patch {test_driver} < {diff}'
- try:
- result = sp.call(command, shell=True)
- if result != 0:
+ diffs = [ joinpath(DIRS['root'], name)
+ for name in [joinpath('build-aux', 'test-driver.diff'),
+ joinpath('build-aux', 'test-driver-1.16.3.diff')]]
+ patched = False
+ for diff in diffs:
+ command = f'patch {test_driver} < {diff}'
+ try:
+ result = sp.call(command, shell=True)
+ except OSError:
raise GLError(20, None)
- except OSError:
+ if result == 0:
+ patched = True
+ break
+ if not patched:
raise GLError(20, None)
--
2.44.0