Skip to content

fix(bootstrap): handle existing Rust installations on pacman systems - #1417

Merged
ilysenko merged 7 commits into
ilysenko:mainfrom
Axiaobo7788:main
Sep 2, 2026
Merged

fix(bootstrap): handle existing Rust installations on pacman systems#1417
ilysenko merged 7 commits into
ilysenko:mainfrom
Axiaobo7788:main

Conversation

@Axiaobo7788

@Axiaobo7788 Axiaobo7788 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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.sh unconditionally installs rustup on pacman systems.
On Arch-derived distributions, rustup conflicts with the distro-provided
rust package, causing make bootstrap-native to abort when Rust is already
installed.

The existing install_rust() check also only verifies that the cargo
command exists. A rustup installation without an installed toolchain may
provide the command while Cargo itself is not usable.

Solution

  • Preserve an existing working distro-provided Rust/Cargo toolchain.
  • Install rustup on pacman systems only when neither working Cargo nor
    rustup is available.
  • Check cargo --version instead of only checking command presence.
  • Initialize the stable toolchain when rustup exists but Cargo is not usable.

Validation

Tested on Manjaro x86_64 with the distro rust package installed.

Before:
make bootstrap-native failed because pacman tried to install conflicting
rustup.

After:
scripts/install-deps.sh preserves the existing Rust toolchain and completes
successfully.

Also validated with:

bash -n scripts/install-deps.sh
git diff --check

Checklist

  • This pull request is ready for review and is no longer a draft.
  • I followed CONTRIBUTING.md, kept the change focused, edited source files rather than generated output, and removed unrelated changes.
  • If this fixes upstream drift, it targets only the latest signed stable OpenAI Linux package and removes obsolete fallback code and tests.
  • I added or updated relevant tests, ran the validation listed above, and confirmed that required CI checks pass.
  • I reviewed the final diff with my coding agent using maximum reasoning effort, addressed all findings, and reran the relevant tests.

@ilysenko ilysenko left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ilysenko
ilysenko merged commit 60928b9 into ilysenko:main Sep 2, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants