Skip to content

Commit

Permalink
Make 'package_manager = dnf4' equivalent to 'package_manager = dnf'
Browse files Browse the repository at this point in the history
Fixes: #1271
  • Loading branch information
praiskup committed Feb 16, 2024
1 parent f9398b0 commit 6b57b22
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mock/py/mockbuild/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
from .mounts import BindMountPoint

fallbacks = {
'dnf': ['dnf', 'dnf5', 'yum'],
'yum': ['yum', 'dnf', 'dnf5'],
'microdnf': ['microdnf', 'dnf','dnf5', 'yum'],
'dnf5': ['dnf5', 'dnf', 'yum'],
'dnf4': ['dnf4', 'dnf5', 'yum'],
'dnf': ['dnf4', 'dnf5', 'yum'], # backward-compat
'yum': ['yum', 'dnf4', 'dnf5'],
'microdnf': ['microdnf', 'dnf4', 'dnf5', 'yum'],
'dnf5': ['dnf5', 'dnf4', 'yum'],
}


Expand All @@ -30,7 +31,9 @@ def package_manager_from_string(name):
return Dnf5
if name == 'yum':
return Yum
if name == 'dnf':
if name == 'dnf4':
return Dnf
if name == 'dnf': # backward compat
return Dnf
if name == 'microdnf':
return MicroDnf
Expand Down Expand Up @@ -671,7 +674,7 @@ def _check_missing(output):


class Dnf(_PackageManager):
name = 'dnf'
name = 'dnf4'
support_installroot = True

def __init__(self, config, buildroot, plugins, bootstrap_buildroot):
Expand Down

0 comments on commit 6b57b22

Please sign in to comment.