From: Collin Funk Date: Sun, 7 Apr 2024 23:41:18 +0000 (-0700) Subject: gnulib-tool.py: Don't remove duplicate avoided modules. X-Git-Tag: v1.0~150 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=eef9efc02c3f4ae988036e49ce5becaa19c14c7b;p=gnulib.git gnulib-tool.py: Don't remove duplicate avoided modules. * pygnulib/GLConfig.py (GLConfig.addAvoid): Don't remove duplicates from the modules passed with --avoid. --- diff --git a/ChangeLog b/ChangeLog index e9054029a7..535dfc04cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-04-07 Collin Funk + + 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 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__)