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>
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. The conflicting package waspulled in as a dependency, so dropping it wouldn't help, and only shell/exit
are offered:
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.