bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib --remove-import removes every module except the one to remove


From: Gavin Smith
Subject: Re: gnulib --remove-import removes every module except the one to remove
Date: Wed, 13 Nov 2024 07:24:15 +0000

On Wed, Nov 13, 2024 at 02:36:40AM +0100, Bruno Haible wrote:
> Hi Gavin,
> 
> > I wanted to remove "copy-file", but it actually removed every other module.
> 
> Thanks for the report. I am committing this probable fix (untested). Can you
> please give it a try?

I can confirm this works.  Thanks for the fix!


> 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.
> 
> diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
> index 32ab54b29a..5d60bd908d 100644
> --- a/pygnulib/GLImport.py
> +++ b/pygnulib/GLImport.py
> @@ -258,7 +258,7 @@ def __init__(self, config: GLConfig, mode: int, m4dirs: 
> list[str]) -> None:
>              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()
>  
> 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]