fix(bootstrap): handle existing Rust installations on pacman systems - #1417
Merged
Conversation
ilysenko
approved these changes
Sep 2, 2026
ilysenko
left a comment
Owner
There was a problem hiding this comment.
Reviewed the complete base-to-head diff. The pacman Rust bootstrap fix is focused, preserves existing working toolchains, and is covered by the live Rust-state matrix. No blockers found.
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.
IMPORTANT: Please keep only one pull request open at a time. The default maximum is two active pull requests from the same contributor, and even that should be reserved for exceptional circumstances. Maintainers may configure a different per-contributor limit for explicit exceptions. Do not open several pull requests at once; finish or close existing work before submitting more. An automated bot will close pull requests that exceed the effective limit.
Problem
install-deps.shunconditionally installsrustupon pacman systems.On Arch-derived distributions,
rustupconflicts with the distro-providedrustpackage, causingmake bootstrap-nativeto abort when Rust is alreadyinstalled.
The existing
install_rust()check also only verifies that thecargocommand exists. A rustup installation without an installed toolchain may
provide the command while Cargo itself is not usable.
Solution
rustupon pacman systems only when neither working Cargo norrustup is available.
cargo --versioninstead of only checking command presence.Validation
Tested on Manjaro x86_64 with the distro
rustpackage installed.Before:
make bootstrap-nativefailed because pacman tried to install conflictingrustup.After:
scripts/install-deps.shpreserves the existing Rust toolchain and completessuccessfully.
Also validated with:
Checklist