Skip to content

Commit 2f85251

Browse files
chapterjasonclaude
andcommitted
llvm: install software-properties-common on non-trixie suites (1.1.1)
llvm.sh requires add-apt-repository on Ubuntu noble and older Debian suites; preinstall software-properties-common unless running on trixie/forky/sid where it's gone and the deb822 path is used instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 27c5ca0 commit 2f85251

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/llvm/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "llvm",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"name": "llvm",
55
"description": "Installs LLVM / Clang on Debian / Ubuntu via the official apt.llvm.org repository. Major-version binaries (clang, clang++, lld, lldb, clangd, clang-format, clang-tidy, etc.) are symlinked into /usr/local/bin without the version suffix.",
66
"documentationURL": "https://github.com/SoureCode/devcontainer-features/tree/master/src/llvm",

src/llvm/install.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ LLVM_VERSION="${VERSION:-22}"
77
LLVM_ALL="${ALL:-true}"
88

99
# llvm.sh writes the LLVM apt source in deb822 format on trixie/forky/sid, so
10-
# software-properties-common (gone from trixie) is no longer required. Older
11-
# Debian/Ubuntu suites still need add-apt-repository — install it on demand
12-
# when llvm.sh asks for it. Only install what's missing.
10+
# software-properties-common (gone from trixie) is no longer required there.
11+
# Older Debian/Ubuntu suites still need add-apt-repository, which lives in
12+
# software-properties-common. Detect the suite and preinstall accordingly.
13+
PKGS=(ca-certificates curl gnupg lsb-release wget)
14+
. /etc/os-release
15+
case "${VERSION_CODENAME:-}" in
16+
trixie|forky|sid) ;;
17+
*) PKGS+=(software-properties-common) ;;
18+
esac
1319
NEED=()
14-
for pkg in ca-certificates curl gnupg lsb-release wget; do
20+
for pkg in "${PKGS[@]}"; do
1521
dpkg -s "$pkg" >/dev/null 2>&1 || NEED+=("$pkg")
1622
done
1723
if [ "${#NEED[@]}" -gt 0 ]; then

0 commit comments

Comments
 (0)