repoquery: Fix loading filelists when -f is used (RhBug:2276012)

When `-f` option is used, the argument is stored in the `opts.file` instead of the `opts.key`. We need to load filelists also in this case.

= changelog =
msg: repoquery: Fix loading filelists when -f is used
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2276012
This commit is contained in:
Jan Kolarik 2024-04-19 06:10:03 +00:00 committed by Marek Blaha
parent 87eb5a7a35
commit 24a461bec0
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ class RepoQueryCommand(commands.Command):
if self.opts.querychangelogs:
demands.changelogs = True
if self.opts.queryfilelist or dnf.util._is_file_pattern_present(self.opts.key):
if self.opts.queryfilelist or self.opts.file or dnf.util._is_file_pattern_present(self.opts.key):
self.base.conf.optional_metadata_types += ["filelists"]
def build_format_fn(self, opts, pkg):