Add migration spec for kernel -> kernel-clk6.12 namespace transition#1215
Open
bmastbergen wants to merge 1 commit into
Open
Add migration spec for kernel -> kernel-clk6.12 namespace transition#1215bmastbergen wants to merge 1 commit into
bmastbergen wants to merge 1 commit into
Conversation
RPM spec that transitions users from old non-namespaced CIQ kernel 6.12.x packages to the new kernel-clk6.12 namespace. Uses rich deps to only migrate packages the user actually has installed. Includes a systemd oneshot service to clean up old installonly packages on next boot (can't rpm -e from %posttrans due to RPM db lock). Migration shims intentionally avoid Provides for non-namespaced names (e.g. kernel-headers) since the namespaced packages already carry those Provides, and adding them to the shims would trigger the corresponding Conflicts directives.
4b2ba6f to
65468cf
Compare
|
I think this is the wrong approach. Instead of using requires and scriptlets to remove the old packages, we should have This should remove the requirement for the boolean dependencies and for users to manually install the migration package. With the above, a simple |
This file contains hidden or 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
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.
The namespaced kernel packages (kernel-clk6.12-*) carry Provides and Conflicts for their non-namespaced equivalents, which prevents co-installation but doesn't create an automatic upgrade path. DNF's dnf upgrade only considers packages with the same name as what's already installed, so it won't spontaneously replace kernel-headers with kernel-clk6.12-headers just because the latter provides and conflicts with the former. Even adding Obsoletes to the namespaced packages wouldn't help, since DNF doesn't evaluate Obsoletes from packages it isn't already considering for installation. The migration package solves this as a one-time explicit action: dnf install kernel-clk6.12-migrate. It uses rich deps to detect which old non-namespaced packages the user has installed, pulls in shim subpackages that Obsoletes those specific old versions, and Requires the namespaced replacements. A systemd oneshot service then cleans up old installonly packages (kernel-core, kernel-modules) on the next reboot, since those can't be removed mid-transaction when they belong to the running kernel.
This may not be the best place for this spec to live, but I've put it here so at least we can have a PR to discuss the issue in.