Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00136.html>.
* pygnulib/GLModuleSystem.py (GLModule.getDependenciesWithConditions):
Reorder conditionals to avoid duplicate checks. Filter out None from the
gathered dependencies when gathering module dependencies. Let
GLModuleSystem.find() warn instead of crashing.
+2024-05-11 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Filter out dependencies that cannot be found.
+ Reported by Paul Eggert in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00136.html>.
+ * pygnulib/GLModuleSystem.py (GLModule.getDependenciesWithConditions):
+ Reorder conditionals to avoid duplicate checks. Filter out None from the
+ gathered dependencies when gathering module dependencies. Let
+ GLModuleSystem.find() warn instead of crashing.
+
2024-05-11 Collin Funk <collin.funk1@gmail.com>
execinfo: Add tests.
result = []
for line in lines:
match = pattern.search(line)
- if match:
- module = line[0 : match.start()]
+ if not match:
+ module_name = line
+ condition = None
+ else:
+ module_name = line[0 : match.start()]
condition = line[match.end() :]
condition = subend(']', '', condition)
- else:
- module = line
- condition = None
- if module != '':
if condition == 'true':
condition = None
- result.append(tuple([self.modulesystem.find(module), condition]))
+ module = self.modulesystem.find(module_name)
+ if module is not None:
+ result.append((module, condition))
self.cache['dependenciesWithCond'] = result
return self.cache['dependenciesWithCond']