Clear unowned running-kernel modules leftovers during update - #9285
Open
fresh3nough wants to merge 1 commit into
Open
Clear unowned running-kernel modules leftovers during update#9285fresh3nough wants to merge 1 commit into
fresh3nough wants to merge 1 commit into
Conversation
kernel-modules-hook restores the booted kver's module tree as unowned files after a linux downgrade. Pacman refuses to install over them before PreTransaction hooks run, so omarchy update stays wedged with thousands of "exists in filesystem" errors. When every reported conflict is unowned under /usr/lib/modules/$(uname -r), quarantine that tree once and retry. Fixes omacom#9142 Signed-off-by: fresh3nough <anonwurcod@proton.me>
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.
Summary
Fixes #9142.
After a kernel downgrade (e.g. omarchy-dev → stable release migration) while still booted into the newer kver,
kernel-modules-hookrestores/usr/lib/modules/$(uname -r)/as unowned files so the live system keeps working. Pacman's file-conflict check runs before PreTransaction hooks, so10-linux-modules-prenever clears them, andlinux-modules-cleanup.serviceskips the running kver. The nextomarchy updatethat re-offers that kernel fails with thousands ofexists in filesystemlines and no recovery.The existing conflict handler only auto-cleared leftovers blamed on
omarchy/omarchy-settingspackages, solinux:module conflicts fell through.Change
In
omarchy-update-system-pkgs-when-conflicted, when every reported filesystem conflict is an unowned path under/usr/lib/modules/$(uname -r), quarantine that modules tree once (same replace/restore path as other leftovers) and retry the upgrade.Test plan
omarchy*-only parse yields 0 leftovers forlinux: .../modules/...conflicts (update stays wedged)./test/shell.d/update-file-conflict-test.shpasses (existing + new cases)