1
0
mirror of synced 2026-04-25 03:54:31 +00:00

Better document and check requirements for --apt_proxy

See http://bugs.debian.org/623443 for the corresponding apt issue.

Also add a dependency on libdata-validate-uri-perl which is used to do
the syntax check.
This commit is contained in:
Axel Beckert
2013-07-10 21:48:33 +02:00
parent 72a2a637be
commit 74f35d6550
3 changed files with 13 additions and 2 deletions

View File

@@ -243,9 +243,10 @@ and EVMS EXAMPLE.
Debian mirror. See http://http.debian.net/ for
details.
--apt_proxy=url
--apt_proxy=protocol://hostname:port/
Specify a proxy to be used by debootstrap, and within
the guest.
the guest. Needs the same syntax as APT's
Acquire::http::Proxy. See apt.conf(5).
--template=tmpl
Specify which template file to use when creating the
@@ -792,6 +793,7 @@ use File::Which;
use Getopt::Long;
use Pod::Usage;
use Data::Dumper;
use Data::Validate::URI qw/ is_uri /;
use Xen::Tools::Common;
@@ -1489,6 +1491,10 @@ sub checkOption
check => qr/^md5|sha256|sha512$/i,
message => "must be md5, sha256 or sha512.\n",
},
uri => {
check => sub { is_uri($_[0]) },
message => "must be an URI including the protocol\n",
},
);
# Define what argument each option accepts.
@@ -1523,6 +1529,7 @@ sub checkOption
mac => 'mac',
ip => 'ipv4_or_auto',
hash_method => 'hashMethod',
apt_proxy => 'uri',
);
# If given option does not exists in optionsTypes,