From 917a879c4b17c02cfdc8f071d00aabff3fb043e1 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sat, 11 Jan 2025 09:11:01 +0100 Subject: [PATCH] place DPkg::Pre-Install-Pkgs workaround into a new config file Using APT_CONFIG will render the setting ineffective. Debian-Bug: #1091442 --- mmdebstrap | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index d133760..244e3c3 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -3108,7 +3108,11 @@ sub run_setup() { # dpkg-preconfigure should not be needed as we also have set # DEBIAN_FRONTEND=noninteractive and DEBCONF_NONINTERACTIVE_SEEN=true and # should thus never see debconf prompts. See #1091442 for details. - print $conf "#clear DPkg::Pre-Install-Pkgs;\n"; + { + open my $tmp, '>', "$options->{root}/etc/apt/apt.conf.d/99debconf" + or error "cannot open /etc/apt/apt.conf.d/99debconf: $!"; + print $tmp "#clear DPkg::Pre-Install-Pkgs;\n"; + } close $conf; @@ -4164,6 +4168,8 @@ sub run_cleanup() { # clean up temporary configuration file unlink "$options->{root}/etc/apt/apt.conf.d/00mmdebstrap" or warning "failed to unlink /etc/apt/apt.conf.d/00mmdebstrap: $!"; + unlink "$options->{root}/etc/apt/apt.conf.d/99debconf" + or warning "failed to unlink /etc/apt/apt.conf.d/99debconf: $!"; if (defined $ENV{APT_CONFIG} && -e $ENV{APT_CONFIG}) { unlink $ENV{APT_CONFIG}