Repository navigation
Conversation
A failed pacstrap run currently ends the installation. Replace that with a prompt that describes the failure and offers a way out, so a single bad package does not cost the user the whole install. The prompt lives in lib/error_recovery.py and knows nothing about pacman: callers pass the choices that make sense for their own failure, and the two that always apply -- resolve it by hand in a shell, or exit -- are appended automatically. Leaving the shell asks whether to resume; exiting offers to save the configuration first, which main.py honours. Unanswered prompts fall back to a caller-declared safe choice after 60 seconds. Where no choice is safe without a human, `safe=None` makes the prompt wait rather than guess, and an unattended run aborts instead of picking something. Conflicts usually arise between transitive dependencies rather than requested packages, so dropping one from the request list would be a no-op and the retry would fail identically. Two guards prevent that loop: a retry only happens when the package list actually changed, and the same failure signature twice in a row stops offering the same way out. lib/pacman/errors.py classifies pacman output into conflicts, missing targets, file conflicts and unsatisfiable dependencies. It does no I/O, so it is tested against recorded pacman output. It reads err.worker_log rather than str(err), which is truncated to the last 500 characters and routinely cuts off the line naming the conflict. Choosing "Exit" is a decision, not a fault, so Installer.__exit__ skips the bug report banner for InstallationAbortedError and lets main() report it. Anything skipped during recovery is re-listed once the installation finishes, so an auto-continued prompt cannot silently produce an incomplete system. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check-docstring-first treats string literals after module constants as extra module docstrings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keys pressed while pacstrap was still 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. Seen while testing the archinstoo port of this change. 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
added a commit
to sernik77/archinstoo
that referenced
this pull request
Nov 9, 2026
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>
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 package 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_first/keep_second choice, retry with --ask=4, which answers exactly that question with yes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Kinda unrelated...So far this feature was reworked few times, and eventually integrated into Archinstoo in pretty minimal form! :)
Feel free to ask any questions or request any changes! :)
|
This branch has not been deployed
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 archinstall let you choose.
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 and
save your config.
one, unattended runs abort instead of guessing.
err.worker_log, notstr(err). The latter is cut to 500 chars andoften loses the line naming the conflict.
Code:
lib/error_recovery.py(generic prompt),lib/pacman/errors.py(pureparser, tested on recorded pacman output), wired into
Pacman.strap().In action
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've reviewed and tested it and
can explain any part of it.