Skip to content

Commit

Permalink
mock: make --dnf-cmd compatible with DNF5
Browse files Browse the repository at this point in the history
Fix #1400
  • Loading branch information
FrostyX authored and praiskup committed Nov 14, 2024
1 parent ef5e4d0 commit 8026806
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mock/py/mockbuild/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,11 @@ def set_config_opts_per_cmdline(config_opts, options, args):
if options.mode == 'yum-cmd':
config_opts['package_manager'] = 'yum'
if options.mode == 'dnf-cmd':
config_opts['package_manager'] = 'dnf'
# If config specifies a different package manager (e.g. yum), force
# using dnf. However, if config specifies its preference on either dnf
# or dnf5, respect that preference.
if config_opts['package_manager'] not in ['dnf', 'dnf5']:
config_opts['package_manager'] = 'dnf'

if options.short_circuit:
config_opts['short_circuit'] = options.short_circuit
Expand Down
1 change: 1 addition & 0 deletions releng/release-notes-next/dnf-cmd.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make `--dnf-cmd` compatible with DNF5

0 comments on commit 8026806

Please sign in to comment.