-
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
Add install --force-replacefiles
#3125
Conversation
Skipping CI for Draft Pull Request. |
/test all I think having a provides marker for this is OK, but it feels like it'd be too easy for some 3rd party rpm-md repo to add this and have something unexpected happen again like replacing I guess I'd lean more towards something like |
(I know you know this, but I'm just re-linking here for completness for others to #2326 because it would make things exactly like this easier to implement and more obvious to users I think if we had a declarative format) |
That said if you prefer this model I'm OK with it, just two other things:
|
I think having it be gated client-side makes sense. I was thinking at first the RPM itself should be marked somehow since it's a specialized payload (in the OCP use case). But higher-level, I think it's clearer to just generalize to "let's expose rpm's
If we go that way, there wouldn't be any special rpm-ostree sauce. Though I noticed now that dnf/libdnf doesn't today expose a way to enable
Yup, will do! |
Circling back to this, I was hacking on adding |
No, I think putting it in |
f2db45b
to
606bc26
Compare
install --force-replacefiles
d667ec0
to
9f247c1
Compare
Updated this now and added a test! As expected, it's way more churn because we need to store it separately in the origin. I debated making this just a special kind of Can split prep patches out if desired. |
9f247c1
to
d5c43de
Compare
I find it easier to use separate variables with names matching the parameter name of the receiving function. And also defaulting them to an empty strv.
Support for specifying local RPMs via `file://` was added in a previous commit, so we need to update this bit too.
Straightforward. Prep for future patch.
That way we can clearly have associated comments with each one. Also prep for conditionally adding another flag.
More verbose, but easier to follow. Prep for adding more conditionals in that area.
Add support for RPMs which want to override files from other RPMs. This could be useful generally, but specifically for example in OCP where we're toying with bundling user-provided overrides as RPMs. We're effectively surfacing rpm's `--replacefiles` switch, though in a slightly safer way because while we do turn on the associated rpmdb flag globally (`RPMPROB_FILTER_REPLACEOLDFILES`), we're only allowing the checkouts of those specific packages to replace files. This is also rendered separately in `status` as `LocalForcedPackages`.
d5c43de
to
3082e4f
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!
Just noting this is another case of needing a lot of "data plumbing" that would be less necessary with #2326
One thing I just wanted to add related to this; a way in which this is a very "rpm-ostree" feature is the way it's implemented it does not have hysteresis. In other words, with traditional But here, the fact that we're recording exactly which packages have this flag on in |
Add support for RPMs which want to override files from other RPMs. This
could be useful generally, but specifically for example in OCP where
we're toying with bundling user-provided overrides as RPMs.
We're effectively surfacing rpm's
--replacefiles
switch, though in aslightly safer way because while we do turn on the associated rpmdb flag
globally (
RPMPROB_FILTER_REPLACEOLDFILES
), we're only allowing thecheckouts of those specific packages to replace files.
This is also rendered separately in
status
asLocalForcedPackages
.