[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py: Correct the result of --extract-dependents
From: |
Bruno Haible |
Subject: |
gnulib-tool.py: Correct the result of --extract-dependents |
Date: |
Fri, 16 Aug 2024 18:28:15 +0200 |
As mentioned in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00018.html>,
$ ./gnulib-tool --extract-dependents hamt
should return
hamt-tests
This patch does it.
2024-08-16 Bruno Haible <bruno@clisp.org>
gnulib-tool.py: Correct the result of --extract-dependents.
* pygnulib/GLModuleSystem.py (GLModule.getDependents): Add the current
module's test module, if that exists.
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index 1f758fb0e5..e9855f775c 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -596,6 +596,11 @@ def getDependents(self) -> list[GLModule]:
listing = [ line
for line in listing
if self.modulesystem.file_is_module(line) ]
+ # ${module}-tests implicitly depends on ${module}, if both exist.
+ if self.isNonTests():
+ implicit_dependent = self.name+'-tests'
+ if self.modulesystem.exists(implicit_dependent):
+ listing.append(implicit_dependent)
candidates = sorted(set(listing))
result = []
for name in candidates:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnulib-tool.py: Correct the result of --extract-dependents,
Bruno Haible <=