From af185b580a79972aefcb30700ff83893adf3964e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 13 Oct 2026 18:25:28 +0200 Subject: [PATCH] install: Detect Ubuntu codename without /etc/lsb-release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ubuntu 26.10 (stonking) images no longer ship /etc/lsb-release, and the base image has no lsb_release command. Both codename lookups returned nothing, so the apt source line had no suite and apt-get update failed: ``` deb [...] https://download-stage.docker.com/linux/ubuntu test E: Malformed entry 1 in list file /etc/apt/sources.list.d/docker.list (Component) ``` Read VERSION_CODENAME from /etc/os-release first, which every supported Ubuntu release provides and get_distribution already relies on. lsb_release and /etc/lsb-release remain as fallbacks when os-release has no codename. Signed-off-by: Paweł Gronowski --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 82ec27f4..6bdab919 100755 --- a/install.sh +++ b/install.sh @@ -507,7 +507,10 @@ do_install() { case "$lsb_dist" in ubuntu) - if command_exists lsb_release; then + if [ -r /etc/os-release ]; then + dist_version="$(. /etc/os-release && echo "$VERSION_CODENAME")" + fi + if [ -z "$dist_version" ] && command_exists lsb_release; then dist_version="$(lsb_release --codename | cut -f2)" fi if [ -z "$dist_version" ] && [ -r /etc/lsb-release ]; then