From 36ef71829023e9a66f1b72b103a2b69762c1927c Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Tue, 10 Nov 2026 19:33:24 +0100 Subject: [PATCH] fix: keep a script's config file when a package installs it Scripts like squid write the package's config before apt installs it. dpkg then asked about the conffile, read EOF with no terminal and failed with exit 100 (#18593). The conffile guard that already protects updates now runs from update_os on every install, without the kept-file notice. --- core/core.func | 2 +- lxc/install.func | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core.func b/core/core.func index fb6a394..05312ce 100644 --- a/core/core.func +++ b/core/core.func @@ -2741,7 +2741,7 @@ apt_conffile_report() { rm -f "$_CS_CONFFILE_GUARD" _CS_CONFFILE_GUARD="" unset APT_CONFIG - [[ -n "${added//[[:space:]]/}" ]] || return 0 + [[ -n "${added//[[:space:]]/}" && -z "${_CS_CONFFILE_QUIET:-}" ]] || return 0 msg_warn "Kept your version of these config files - upstream shipped changes to them too:" local f diff --git a/lxc/install.func b/lxc/install.func index 98b3f31..875257a 100644 --- a/lxc/install.func +++ b/lxc/install.func @@ -1371,6 +1371,10 @@ network_check() { # Updates container OS and sources appropriate tools.func # ------------------------------------------------------------------------------ update_os() { + # Scripts write a package's config before installing it; dpkg then asked about + # the conffile with no terminal and the install failed. + _CS_CONFFILE_QUIET=1 + declare -f apt_conffile_guard >/dev/null 2>&1 && apt_conffile_guard msg_info "Updating Container OS" configure_http_proxy