Restored dnf5 install --downloadonly option

This commit is contained in:
David Murphy 2025-03-04 14:07:37 -07:00 committed by Daniel Wozniak
parent cd04e6f2f9
commit 3a852d18f6

View file

@ -241,7 +241,7 @@ def _versionlock_pkg(grains=None):
""" """
if grains is None: if grains is None:
grains = __grains__ grains = __grains__
if _yum() == "dnf": if _yum() in ("dnf", "dnf5"):
if grains["os"].lower() == "fedora": if grains["os"].lower() == "fedora":
return ( return (
"python3-dnf-plugin-versionlock" "python3-dnf-plugin-versionlock"
@ -1988,7 +1988,7 @@ def upgrade(
salt '*' pkg.upgrade security=True exclude='kernel*' salt '*' pkg.upgrade security=True exclude='kernel*'
""" """
if _yum() in ("dnf", "dnf5") and not obsoletes: if _yum() in ("dnf", "dnf5") and not obsoletes:
# for dnf we can just disable obsoletes # for dnf[5] we can just disable obsoletes
_setopt = [ _setopt = [
opt opt
for opt in salt.utils.args.split_input(kwargs.pop("setopt", [])) for opt in salt.utils.args.split_input(kwargs.pop("setopt", []))