forked from josch/mmdebstrap
rudimentary support for tor:// URIs
This commit is contained in:
parent
58004816d1
commit
550562cf6f
1 changed files with 6 additions and 0 deletions
|
@ -788,9 +788,15 @@ sub setup {
|
||||||
open(my $pipe_apt, '-|', 'apt-get', 'indextargets', '--format', '$(URI)', 'Created-By: Packages') or die "cannot start apt-get indextargets: $!";
|
open(my $pipe_apt, '-|', 'apt-get', 'indextargets', '--format', '$(URI)', 'Created-By: Packages') or die "cannot start apt-get indextargets: $!";
|
||||||
while (my $uri = <$pipe_apt>) {
|
while (my $uri = <$pipe_apt>) {
|
||||||
if ($uri =~ /^https:\/\//) {
|
if ($uri =~ /^https:\/\//) {
|
||||||
|
# FIXME: support for https is part of apt >= 1.5
|
||||||
$pkgs_to_install_from_outside{'apt-transport-https'} = ();
|
$pkgs_to_install_from_outside{'apt-transport-https'} = ();
|
||||||
$pkgs_to_install_from_outside{'ca-certificates'} = ();
|
$pkgs_to_install_from_outside{'ca-certificates'} = ();
|
||||||
last;
|
last;
|
||||||
|
} elsif ($uri =~ /^tor(\+[a-z]+)*:\/\//) {
|
||||||
|
# tor URIs can be tor+http://, tor+https:// or even
|
||||||
|
# tor+mirror+file://
|
||||||
|
$pkgs_to_install_from_outside{'apt-transport-tor'} = ();
|
||||||
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close $pipe_apt;
|
close $pipe_apt;
|
||||||
|
|
Loading…
Reference in a new issue