In test-gettext-7.sh there are missing modules in gl_AVOID and the
actioncmd printed on Makefiles. This is because gnulib-tool.py will
remove the duplicates. This patch fixes that.

Collin
From 4fa6f5231eed42a9935c1f25cdf3c1db3431a8c4 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sun, 7 Apr 2024 16:41:18 -0700
Subject: [PATCH] gnulib-tool.py: Don't remove duplicate avoided modules.

* pygnulib/GLConfig.py (GLConfig.addAvoid): Don't remove duplicates from
the modules passed with --avoid.
---
 ChangeLog            | 6 ++++++
 pygnulib/GLConfig.py | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e9054029a7..535dfc04cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-07  Collin Funk  <collin.fu...@gmail.com>
+
+	gnulib-tool.py: Don't remove duplicate avoided modules.
+	* pygnulib/GLConfig.py (GLConfig.addAvoid): Don't remove duplicates from
+	the modules passed with --avoid.
+
 2024-04-07  Bruno Haible  <br...@clisp.org>
 
 	sigsegv tests: Avoid a crash on NetBSD 10.0/i386.
diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py
index f5282dbf53..0f9d118a78 100644
--- a/pygnulib/GLConfig.py
+++ b/pygnulib/GLConfig.py
@@ -559,8 +559,7 @@ class GLConfig:
         '''Avoid including the given module. Useful if you have code that provides
         equivalent functionality.'''
         if type(module) is str:
-            if module not in self.table['avoids']:
-                self.table['avoids'].append(module)
+            self.table['avoids'].append(module)
         else:  # if module has not str type
             raise TypeError('avoid must be a string, not %s'
                             % type(module).__name__)
-- 
2.44.0

Reply via email to