Repository navigation
Conversation
One conflicting package used to end the whole install: Pacman.ask() tried its keyring/pacman.conf resets, offered a blind "re-try download?" and then raised. Port of archlinux/archinstall#4870, adapted to archinstoo. - pm/errors.py classifies pacman output (conflict, missing target, file conflict, unsatisfiable dependency, unknown). No I/O, tested against recorded output. It reads err.worker_log, since str(err) keeps only the last 500 characters and often loses the line naming the conflict. - pm/recovery.py is the prompt: the caller's choices plus "resolve in a shell" and "exit", which are always there. - Pacman.strap() keeps the keyring and pacman.conf resets: each runs once, before anything is asked. Then the prompt offers what can change the outcome: keep one side of a conflict, drop, rename, overwrite, retry. - A retry only happens when the package list changed, and the same failure twice in a row stops offering the same way out, so no loops. - --silent and a closed stdin stop the install instead of guessing, as before. Interactive prompts wait: no timeout picks anything. - Choosing "Exit" is reported without the bug report banner; the selections were saved before the install, so the next run offers to resume them. - Skipped packages are listed again before the final verdict. - Host-to-target keeps pacman -S, with a hint that fits it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keys pressed while pacstrap was running (an Enter or two while waiting) sat in the terminal buffer and answered the prompt unseen, and every wrong answer redrew the whole block, stacking copies of the choices on screen. Flush pending input before each question, and ask again on one line instead of re-rendering; an empty line just asks again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sernik77
force-pushed
the
pacstrap-error-recovery
branch
from
November 9, 2026 19:08
dfd94b8 to
481d37c
Compare
Current pacman names both sides of a conflict as name-pkgver-pkgrel
('pipewire-jack-1:1.6.10-1'). Taken verbatim, neither matched the request
list, so a conflict between two requested packages read as one between
dependencies and only shell/exit were offered. Cut the version, but only
when it looks like one, so names like dotnet-runtime-8.0 stay whole.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the side the user chose to drop had already been installed by an earlier step, dropping it from the request changed nothing: pacman asked "Remove pipewire-jack? [y/N]", --noconfirm answered no, and the retry failed the same way. After an explicit keep choice, retry with --ask=4, which answers exactly that question with yes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sernik77
marked this pull request as ready for review
November 9, 2026 20:02
Owner
|
Thanks for the contribution ! I actually really like the idea. But the idea is a lot of different things together.
This sounds like a packaging issue (perhaps upstream-able)? Which combination caused this conflict?
This is great, I really like this part. I think if you can move just this part to a separate PR I'd be really happy to take this idea. The more minimal the easier to test and review :) |
Owner
|
I extracted a minimal patch from some of your changes :) Let me know what you think. ^^ For the more thorough error handling about conflicts and such, I'm not sure they would actually happen in practice with how |
Owner
|
I'll close this for now, if you ever submit smaller patches I'll gladly review them more in depth |
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.
Right now one broken package during pacstrap kills the whole install. You've
partitioned, picked everything, waited for the downloads, and then a single
conflict sends you back 5 minutes. This PR makes archinstoo let you choose.
Port of archlinux/archinstall#4870, adapted to how archinstoo already works.
unsatisfiable dep) and you get fixes that fit: keep one side, drop, rename,
overwrite, retry. Plus always: drop to a shell and resume, or exit.
pacman.confresets stay: each runs once, automatically,before anything is asked. Only the blind "re-try download? (Y/n)" dead end
is replaced.
--silentstill stops instead of guessing, and interactive prompts justwait (no timeout picking for you).
err.worker_log, notstr(err). The latter is cut to 500 chars andoften loses the line naming the conflict.
already saved before the install, so the next run offers to resume them.
pacman -S, with a hint that fits it.Code:
lib/pm/errors.py(pure parser, tested on recorded pacman output),lib/pm/recovery.py(generic prompt), wired intoPacman.strap(). Tests intest_pm_errors.py/test_pm_recovery.py; pytest and the full pre-commit(ruff, mypy, pylint, lint-imports) pass.
In action
Both screenshots are from the archlinux/archinstall#4870 run. archinstoo shows the
same prompts, minus the "or wait 60s" fallback, since here they just wait.
jack2+pipewire-jackin Additional packages: keep either side, dropboth, or the usual shell/exit. Keeping one also lets pacman replace the other
when an earlier step already installed it:
After a failed manual fix in the shell, the same failure shows up again, so

it now offers to skip the remaining packages and carry on:
Why: I kept hitting the
jack2/pipewire-jackconflict myself, and losinga whole install over one package felt wrong. So I spent a few hours of spare
time, doing my part in making Arch a slightly better place :)
AI disclosure: the idea and design are mine; Claude Opus 5.5 wrote the code,
the tests and the first draft of this text. I tested it on archinstall in a
VM, and on an archinstoo ISO in a VM; Host-2-Target is still to do before I
mark this ready. I can explain any part of it.