From c26ec4d6fc9118f7394ebde75725f7fba8e5fd1a Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 22 Jan 2020 00:28:48 +0100 Subject: [PATCH] instead of hardcoding /etc/apt/trusted.gpg, read it from apt-config shell --- mmdebstrap | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index ab8a4dd..35caaf9 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -2685,6 +2685,13 @@ sub main() { # copy ARGV because getopt modifies it my @ARGVORIG = @ARGV; + # obtain the correct defaults for the keyring locations that apt knows + # about + my $apttrusted + = `eval \$(apt-config shell v Dir::Etc::trusted/f); printf \$v`; + my $apttrustedparts + = `eval \$(apt-config shell v Dir::Etc::trustedparts/d); printf \$v`; + chomp(my $hostarch = `dpkg --print-architecture`); my $options = { components => ["main"], @@ -2694,8 +2701,8 @@ sub main() { mode => 'auto', dpkgopts => [], aptopts => [], - apttrusted => "/etc/apt/trusted.gpg", - apttrustedparts => "/etc/apt/trusted.gpg.d", + apttrusted => $apttrusted, + apttrustedparts => $apttrustedparts, noop => [], setup_hook => [], essential_hook => [],