]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Fix logic of --remove-import option.
authorBruno Haible <bruno@clisp.org>
Wed, 13 Nov 2024 01:36:11 +0000 (02:36 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 1 Dec 2024 06:32:33 +0000 (07:32 +0100)
Reported by Gavin Smith <gavinsmith0123@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00101.html>.

* pygnulib/GLImport.py (GLImport.__init__): Compute the modules to keep
correctly.

ChangeLog
pygnulib/GLImport.py

index b79228af2f484802855043110955dea52973a7c5..97a99b7264a160e81cbd2df52a367627969bebc2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-11-12  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool.py: Fix logic of --remove-import option.
+       Reported by Gavin Smith <gavinsmith0123@gmail.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00101.html>.
+       * pygnulib/GLImport.py (GLImport.__init__): Compute the modules to keep
+       correctly.
+
 2024-11-11  Bruno Haible  <bruno@clisp.org>
 
        fts: Fix dependencies.
index 5f090d4ea118ca625d36180fa85e18495d7e52a1..da4f184a8831f1d452036c9f1cf0a9ffaeef88aa 100644 (file)
@@ -255,7 +255,7 @@ class GLImport:
             elif self.mode == MODES['remove-import']:
                 modules = [ module
                             for module in old
-                            if module in new ]
+                            if not module in new ]
             elif self.mode == MODES['update']:
                 modules = self.cache.getModules()