New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle packages with multiple versions properly with zypper #48294
Handle packages with multiple versions properly with zypper #48294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests?
@isbm - Right, currently working on them. I'll ping you back when I uploaded them. |
a8f6a1c
to
d68ffec
Compare
d68ffec
to
5d3a262
Compare
@isbm - Tests are pushed now. This should be ready now for review. Thanks 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meaksh very nice! One little nitpick and good to go.
salt/modules/zypper.py
Outdated
line, | ||
osarch=__grains__['osarch'] | ||
) | ||
if pkginfo is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if pkginfo:
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meaksh thanks!
What does this PR do?
This PR fixes some issues introduced after merging #47678 .
What issues does this PR fix or reference?
gpg-pubkey
entries fromzypper.list_pkg
changes
onpkg.installed
output when dealing with packages with multiple versions installed.changes
onpkg.installed
output when packages name include "arch".Previous Behavior
On a SUSE systems, given this SLS state file:
Applying
my_tests
state will produce:Notice that
perseus-dummy.x586
package, as well askernel-default
, are actually installed but not reported onchanges
(and they should). Also the non-desiredgpg-pubkey
entry is not excluded fromchanges
since it's not actually a real package.New Behavior
Given the same SLS file:
Now, both
perseus-dummy.i586
andkernel-default
are successfully reported onchanges
, and thegpg-pubkey
entry is excluded.Tests written?
Yes
Commits signed with GPG?
Yes