change to improve Secure Apt support - needs more testing.
git-svn-id: http://emdebian.org/svn/current@7701 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
79d2a8c907
commit
b07ecbf9f7
1 changed files with 6 additions and 1 deletions
|
@ -271,7 +271,7 @@ if ((defined $k) and (not defined $noauth)) {
|
||||||
system ("$str apt-get -y -d --reinstall install $k");
|
system ("$str apt-get -y -d --reinstall install $k");
|
||||||
foreach my $keyring_pkg (values %keyrings) {
|
foreach my $keyring_pkg (values %keyrings) {
|
||||||
my @files=();
|
my @files=();
|
||||||
my $file = `find /var/cache/apt/archives/ -name "$keyring_pkg*"`;
|
my $file = `find /var/cache/apt/archives/ -name "$keyring_pkg*"|grep -m1 $keyring_pkg`;
|
||||||
chomp ($file);
|
chomp ($file);
|
||||||
if ($file eq "") {
|
if ($file eq "") {
|
||||||
my $msg = sprintf (_g("Unable to download keyring package: '%s'"),$dir);
|
my $msg = sprintf (_g("Unable to download keyring package: '%s'"),$dir);
|
||||||
|
@ -291,6 +291,11 @@ if ((defined $k) and (not defined $noauth)) {
|
||||||
"--homedir=${dir}/etc/apt/trusted.gpg.d/ ".
|
"--homedir=${dir}/etc/apt/trusted.gpg.d/ ".
|
||||||
"--keyring=multistrap.gpg ".
|
"--keyring=multistrap.gpg ".
|
||||||
" --import ${xdir}/usr/share/keyrings/${gpg} 2>/dev/null");
|
" --import ${xdir}/usr/share/keyrings/${gpg} 2>/dev/null");
|
||||||
|
if (-f "${dir}/etc/apt/trusted.gpg.d/multistrap.gpg") {
|
||||||
|
system ("cp ${dir}/etc/apt/trusted.gpg.d/multistrap.gpg ${dir}/etc/apt/trusted.gpg.d/trustdb.gpg");
|
||||||
|
} else {
|
||||||
|
die (_g("Secure Apt handling failed - try without authentication."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
system ("rm -rf ${xdir}");
|
system ("rm -rf ${xdir}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue