ci: fix bump-bootstrap toolchain install (clang alternatives clash)#1483
Open
mbouaziz wants to merge 1 commit into
Open
ci: fix bump-bootstrap toolchain install (clang alternatives clash)#1483mbouaziz wants to merge 1 commit into
mbouaziz wants to merge 1 commit into
Conversation
…ain install The first dry_run of bump-bootstrap failed at the toolchain step: update-alternatives: error: alternative clang++ can't be slave of clang: it is a master alternative The GitHub ubuntu-24.04 runner image preinstalls clang with update-alternatives entries where clang++ (and the other LLVM tools) are master alternatives, which collides with the master(clang)+slave(clang++, llc, ...) layout apt-install.sh installs. The Docker image builds never hit this because they run the same script from a clean base image. Remove the managed alternative names before running apt-install.sh so the install starts from a clean slate. Runner-only; nothing else runs the script on a prepopulated host.
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.
The first
dry_runof thebump-bootstrapworkflow (run) got through checkout and the token preflight, then failed installing the toolchain:Cause
The GitHub
ubuntu-24.04runner image preinstalls clang withupdate-alternativesentries whereclang++(and the other LLVM tools) are master alternatives.bin/apt-install.sh skiplang-build-depsinstallsclangas a master withclang++,llc,opt, … as slaves — andupdate-alternativesrefuses to demote an existing master to a slave, so it aborts.The Docker image builds never hit this: they run the same script from a clean base image with no preexisting alternatives. It's specific to running
apt-install.shon a bare runner, which only this workflow does.Fix
Before the install,
--remove-allthe nine alternative names the script manages, so the setup starts clean. Guarded with|| true, so it's a no-op where they're absent.actionlint clean; the removed-name list matches
apt-install.sh's master + slaves exactly. The token preflight and the fast-forward push logic already validated on the failed run (steps 1–3 were green); this unblocks the toolchain step so a re-dispatcheddry_runcan exercise the full build.— Mehdi (with Claude Opus 4.8, xhigh effort)
🤖 Generated with Claude Code