Skip to content

Commit

Permalink
repoquery: Fix loading filelists when -f is used (RhBug:2276012)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jan-kolarik authored and m-blaha committed Apr 19, 2024
1 parent 87eb5a7 commit 24a461b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnf/cli/commands/repoquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def configure(self):
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):
Expand Down

0 comments on commit 24a461b

Please sign in to comment.