Update salt/modules/yumpkg.py

Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
This commit is contained in:
David Murphy 2023-07-20 09:38:37 -06:00 committed by Megan Wilhite
parent c81c7b3f70
commit 6a256a59a1

View file

@ -124,7 +124,7 @@ def _get_hold(line, pattern=__HOLD_PATTERN, full=True):
dnf ==> vim-enhanced-2:7.4.827-1.fc22.*
"""
if full:
if _yum() == "dnf" or _yum() == "dnf5":
if _yum() in ("dnf", "dnf5"):
lock_re = rf"({pattern}-\S+)"
else:
lock_re = rf"(\d+:{pattern}-\S+)"