-
Notifications
You must be signed in to change notification settings - Fork 198
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
core: Compare rpm file coloring within layered packages #3161
Conversation
Prep for specializing the `TR_ADDED` branch further.
Hmm, not sure what's going on there. Digging. |
This converts `files_added` from a `map{path -> color}` to a `map{nevra -> map{path -> color}` and similarly for `files_skip_add`. Prep for next patch which makes use of that extra information.
d0f75c0
to
efaa0bc
Compare
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.
LGTM, though my knowledge of librpm API/usage is quite shallow.
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.
Some optional bits, feel free to merge as is. Thanks for doing this!
Before, we were only comparing rpm file coloring between layered packages and base packages. But we also need to compare layered packages among themselves. A concrete example is `unixODBC` which isn't in e.g. Fedora Silverblue, but which some packages pull in both the i686 and x86_64 versions. In that case, we need to skip the checkout of files in the i686 version which are also in the x86_64 one. Closes: coreos#1937
This matches the pattern we use for `files_skip_delete` and makes it clear it won't be used later.
We only ever need to handle RPM file colors on architectures that have them. And even on those that do, we only need to decide between differently colored RPM files, and not e.g. documentation files. So we can skip adding those to the map of files added.
efaa0bc
to
19ccb7d
Compare
Updated for comments! |
@cgwalters This fixes an install blocker for some Fedora packages (most noticably lutris (described in #1937)). Can this PR be included in a dot release of 2021.12? EDIT: I'm a bit very confused. Just gave the old reproducer a try and the issue was no longer reproduciable (already with 2021.11). I have a guess why: May this issue only show up if
EDIT2: Issue #1937 appears on any update afterwards. Do not remember if this was originally the case. I'll wait for !3161 to land and test again. |
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.
Nice!
Before, we were only comparing rpm file coloring between layered
packages and base packages. But we also need to compare layered packages
among themselves. A concrete example is
unixODBC
which isn't in e.g.Fedora Silverblue, but which some packages pull in both the i686 and
x86_64 versions. In that case, we need to skip the checkout of files in
the i686 version which are also in the x86_64 one.
Closes: #1937