Fix refresh_db regression in yumpkg.py #27308
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
739b2ef introduced a regression by changing this function to passing a list of
arguments. The regression was also partly caused by requiring the user to pass
the yum CLI arguments for enabling and disabling repos manually. So if someone
passed multiple values for the repo argument
(e.g. repo='--disablerepo="*" --enablerepo=anotherrepo') then these would both
end up in the same list element, which would cause the yum command to fail as
they would be expected by yum to be a single argument instead of separate
arguments.
This commit reverts the changes from 739b2ef and also changes the inconsistent
behavior of requiring the repo options to be manually submitted, making this
function instead work like all the other functions (install(), etc.) which
interpret the Salt CLI kwargs to figure out which repo options to use.
Fixes #27307.