From 77353722444ccd855e8893c8dcef7b2a0d94337e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B6gl-Brunner=20Michel?= Date: Wed, 11 Nov 2026 12:53:54 +0100 Subject: [PATCH] immich: update adds the Testing repo without debian.sources Containers without /etc/apt/sources.list.d/debian.sources (Incus images) got testing.sources from the install, but the update only looked in debian.sources and ran sed on the missing file. Check every *.sources file, and write testing.sources like the install does when debian.sources can't take it. --- ct/immich.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ct/immich.sh b/ct/immich.sh index dd422937a..0cf9216b9 100644 --- a/ct/immich.sh +++ b/ct/immich.sh @@ -38,12 +38,20 @@ function update_script() { exit fi - if ! grep -qE '(^|[[:space:]])testing([[:space:]]|$)' /etc/apt/sources.list.d/debian.sources 2>/dev/null; then + if ! grep -qsE '^[[:space:]]*Suites:.*(^|[[:space:]])testing([[:space:]]|$)' /etc/apt/sources.list.d/*.sources; then msg_info "Adding Debian Testing repo" if grep -q "trixie-updates" /etc/apt/sources.list.d/debian.sources 2>/dev/null; then sed -i 's/ trixie-updates/ trixie-updates testing/g' /etc/apt/sources.list.d/debian.sources - else + elif grep -qsE '^[[:space:]]*Suites:.*trixie' /etc/apt/sources.list.d/debian.sources; then sed -i '/^[[:space:]]*Suites:.*trixie/ s/$/ testing/' /etc/apt/sources.list.d/debian.sources + else + cat </etc/apt/sources.list.d/testing.sources +Types: deb +URIs: http://deb.debian.org/debian +Suites: testing +Components: main +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg +EOF fi cat </etc/apt/preferences.d/preferences Package: *