I started to look at the Python gnulib-tool and ran into this error that
should be easily reproducible:
[collin@debian src]$ gnulib-tool.py --create-testdir --dir test dummy
Module list with included dependencies (indented):
dummy
File list:
lib/dummy.c
m4/00gnulib.m4
m4/gnulib-common.m4
m4/zzgnulib.m4
Traceback (most recent call last):
File "/home/collin/.local/bin/gnulib-tool.py", line 1171, in <module>
main()
File "/home/collin/.local/bin/gnulib-tool.py", line 908, in main
testdir.execute()
File "/home/collin/.local/src/gnulib/pygnulib/GLTestDir.py", line 503,
in execute
self.config.setAuxDir(saved_auxdir)
^^^^^^^^^^^^
NameError: name 'saved_auxdir' is not defined
I commented out the offending line instead of removing it just in case
it is useful in the future. The previous command should work with the
dummy module so I can start comparing the output while learning the code.
From 6d94d65bfb0afc77c28b9c3a4633d156eb94906a Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Wed, 21 Feb 2024 03:25:37 -0800
Subject: [PATCH] gnulib-tool.py: Comment out undefined variable.
* pygnulib/GLTestDir.py (GLTestDir.execute): Comment out line
that causes a NameError exception when executed.
---
ChangeLog | 6 ++++++
pygnulib/GLTestDir.py | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index dfc1641e74..60c3dd4e8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-02-21 Collin Funk <collin.fu...@gmail.com>
+
+ gnulib-tool.py: Comment out undefined variable.
+ * pygnulib/GLTestDir.py (GLTestDir.execute): Comment out line
+ that causes a NameError exception when executed.
+
2024-02-20 Bruno Haible <br...@clisp.org>
unimetadata/u-version: Add tests.
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index ae8537cff4..52171fdd9e 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -500,7 +500,8 @@ class GLTestDir(object):
file.write(emit)
# Restore changed variables.
- self.config.setAuxDir(saved_auxdir)
+ # FIXME: Undefined?
+ # self.config.setAuxDir(saved_auxdir)
auxdir = self.config['auxdir']
subdirs_with_configure_ac += [testsbase]
--
2.39.2