From baf02ccc83c3c54ee16e151c944febf59a14d8d7 Mon Sep 17 00:00:00 2001 From: Jan Kolarik Date: Fri, 12 Jan 2024 10:44:09 +0100 Subject: [PATCH] Request filelists metadata for plugins needing that Prepare for switching to not loading filelists metadata by default. Explicitly request the metadata by plugins that need them. --- plugins/download.py | 3 +++ plugins/needs_restarting.py | 1 + plugins/repoclosure.py | 1 + 3 files changed, 5 insertions(+) diff --git a/plugins/download.py b/plugins/download.py index d8ce4bec..a8e43a05 100644 --- a/plugins/download.py +++ b/plugins/download.py @@ -91,6 +91,9 @@ def configure(self): else: self.base.conf.destdir = dnf.i18n.ucd(os.getcwd()) + if dnf.util._is_file_pattern_present(self.opts.packages): + self.base.conf.optional_metadata_types += ["filelists"] + def run(self): """Execute the util action here.""" diff --git a/plugins/needs_restarting.py b/plugins/needs_restarting.py index 904db5ed..86777a2a 100644 --- a/plugins/needs_restarting.py +++ b/plugins/needs_restarting.py @@ -268,6 +268,7 @@ def set_argparser(parser): def configure(self): demands = self.cli.demands demands.sack_activation = True + self.base.conf.optional_metadata_types += ["filelists"] def run(self): process_start = ProcessStart() diff --git a/plugins/repoclosure.py b/plugins/repoclosure.py index be15a907..a052d94f 100644 --- a/plugins/repoclosure.py +++ b/plugins/repoclosure.py @@ -45,6 +45,7 @@ def configure(self): demands = self.cli.demands demands.sack_activation = True demands.available_repos = True + self.base.conf.optional_metadata_types += ["filelists"] if self.opts.repo: for repo in self.base.repos.all(): if repo.id not in self.opts.repo and repo.id not in self.opts.check: