devcontainer: derive LLVM apt repo codename from base image - #29
Merged
Conversation
The python:3.11-slim base moved from Debian 12 (bookworm) to 13 (trixie), but the Dockerfile hardcoded the bookworm apt.llvm.org repo. It kept working only because trixie ships clang-19 natively (the toolchain resolves from deb.debian.org, not apt.llvm.org), leaving the mismatched repo as dead weight that would break a CLANG_VERSION bump past what Debian packages. Derive the codename from /etc/os-release so the repo tracks whatever Debian codename the base image ships, fixing the mismatch and future-proofing the next base-image bump.
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.
What
The devcontainer's
python:3.11-slimbase image silently advanced from Debian 12 (bookworm) to Debian 13 (trixie). The Dockerfile hardcoded the bookworm LLVM apt repo:on what is now a trixie base. This derives the codename from
/etc/os-releaseinstead:Why it matters
The mismatch was latent, not fatal: trixie ships clang-19 in its own archive, so
aptinstalled the whole toolchain fromdeb.debian.organd never actually used the wrong-codename apt.llvm.org repo. But it's dead weight that would break the momentCLANG_VERSIONis bumped past what Debian packages — the fallback repo would point at the wrong Debian release. Deriving the codename fixes today's mismatch and future-proofs the next base-image bump.Validation
base-systemstage on the trixie base:apt.llvm.org/trixienow resolves (Get: https://apt.llvm.org/trixie llvm-toolchain-trixie-19 InRelease), and clang-19 / clangd-19 / clang-format-19 / lld-19 / libc++-19-dev install cleanly fromdeb.debian.org trixie/main.t-csrandt-densecompile and pass.No functional change to the installed toolchain (clang-19 comes from Debian either way) — this only corrects the fallback repo codename.