Fixes #37072 - Made package update choose the correct version #11213
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.
What are the changes introduced in this pull request?
Package Update now correctly picks the package to update when you chose from a drop down on the host packages tab.
Considerations taken when implementing this change?
When we choose a specific version of package a to update on the host - we try to infer the name and arch of the package to be upgraded. This information is then used to determine how the update command should look. The changes here use the pre-existing
Katello::Util::Package.parse_nvrea
to figure out the package provided in the template instead of the magical potentially fault regexWhat are the testing steps for this pull request?
crypto-policies-20221215-1.git9a18988.el9.noarch
crypto-policies-scripts-20221215-1.git9a18988.el9_2.1.noarch
via the dropdown on the right side of the upgradable RPMCheck the template preview of the job created
Before PR
After PR
Feel free to try other rpms to upgrade.