-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[master] Fix inconsistency with pkg.list_pkgs
when using attr
on RHEL systems
#55580
Merged
dwoz
merged 24 commits into
saltstack:master
from
meaksh:master-fix-list_pkg-output-when-using-attr
Jan 14, 2020
Merged
[master] Fix inconsistency with pkg.list_pkgs
when using attr
on RHEL systems
#55580
dwoz
merged 24 commits into
saltstack:master
from
meaksh:master-fix-list_pkg-output-when-using-attr
Jan 14, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This broke 32-bit package installs on 64-bit Debian/Ubuntu. I'm not sure why a modification to aptpkg.py was included in a PR meant to address RHEL, or how it got merged without a test, though given that it was incorrectly implemented, a test would likely only have served to confirm the incorrect behavior anyway. At any rate, I've fixed this in #57084. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR ports #51108 to master branch
Now,
pkg_resource.format_pkg_list
does not directly parse the "arch" from the package name but delegates it to an optionalparse_arch_from_name
particular implementation on each virtual "pkg" module.What does this PR do?
This PR fixes an issue on the
pkg.list_pkgs
method when usingattr
parameter on RHEL systems.On past PRs we've introduced the use of
attr
onpkg.list_pkgs
on the Zypper/Yum modules for collecting not only the package version string but instead getting the desired RPM attributes (likeepoch
,install_date
,release
, etc) in an unified and structured way.So when using
attr
the output frompkg.list_pkgs
will follow this specific format forattr='release,arch'
):As you can see, the format is meant to group all installed versions of the same package (with its RPM attributes) into a single key
package
which holds a list containing a dict with all attrs for each installed version.Previous Behavior
On SUSE systems there is no problem since packages with different architectures always have different names, like
glibc
andglibc-32bit
👍But the problem is happening on RHEL systems, where the architecture is internally handled by Salt as part of the package name. This is leading into an inconsistent looking output from
pkg.list_pkgs
according with the proposed format when usingattr
:New Behavior
The expected output should consider
glibc
andglibc.i686
as the same package and group them into the same dict key. The output should be:Tests written?
Yes
Commits signed with GPG?
Yes