From 45479be70defd4133ea11e2b8c14fe77dad7e405 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 8 Mar 2024 22:30:03 -0800 Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 49. Follow gnulib-tool change 2021-08-07 Bruno Haible 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 cc1f322a17..3295f44c10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-03-09 Collin Funk + + gnulib-tool.py: Follow gnulib-tool changes, part 49. + Follow gnulib-tool change + 2021-08-07 Bruno Haible + 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-09 Bruno Haible unistr/u16-to-u32: Relicense under LGPLv2+. 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 -Date: Sun Aug 8 03:52:01 2021 +0200 - - gnulib-tool: Add support for Automake 1.16.4. - - Reported by in - . - - * 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 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.39.5