Commit 889e4bf7 authored by Chris Lamb's avatar Chris Lamb 💬

Ensure Debian substvar generation is deterministic regardless of installed...

Ensure Debian substvar generation is deterministic regardless of installed packages. (Closes: #908072)
parent d57dba35
Pipeline #18693 failed with stage
in 3 minutes and 30 seconds
......@@ -330,11 +330,20 @@ class ListToolsAction(argparse.Action):
class ListDebianSubstvarsAction(argparse._StoreTrueAction):
def __call__(self, *args, **kwargs):
# Ensure all comparators are imported so tool_required.all is
# populated.
# Attempt to import all comparators so tool_required.all is as
# populated as possible...
ComparatorManager().reload()
tools = tool_required.all
# ... however for the generated substvar to be effective/deterministic
# regardless of the currently installed packages we special-case some
# tools (NB. not package names) as their modules may not have been
# imported by the `ComparatorManager().reload()` call above. (#908072)
tools = set((
'gpg', # comparators/debian.py
'rpm2cpio', # comparators/rpm.py
))
tools.update(tool_required.all)
packages = set()
for x in tools:
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment