tools/osbuild-depsolve-dnf5: support optional metadata

We originally enabled filelists unconditionally in dnf5.  Let's make it
optional as part of the 'optional-metadata' option in the arguments so
that the caller can decide if it's needed, for example when using dnf5
with older repositories that have packages with file dependencies, but
don't download them when they're not needed, since the filelists are
quite large.
This commit is contained in:
Achilleas Koutsou 2024-05-16 19:37:27 +02:00 committed by Michael Vogt
parent 806a1caba7
commit 31362772dd

View file

@ -153,8 +153,10 @@ class Solver():
conf.persistdir = persistdir
conf.cachedir = cachedir
# Load the file lists, so dependency on paths will work
conf.optional_metadata_types = ['comps', 'filelists']
# Include comps metadata by default
metadata_types = ['comps']
metadata_types.extend(arguments.get("optional-metadata", []))
conf.optional_metadata_types = metadata_types
try:
# NOTE: With libdnf5 packages are excluded in the repo setup