mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
Actually --no-fallback makes no sense for these scripts, although we probably want it for test-builders
This commit is contained in:
parent
40aa623ac3
commit
3354374972
@ -54,10 +54,6 @@ Should be in the form \fBhttp://security.debian.org\fR.
|
|||||||
If the package isn't found on this mirror, \fBpull\-debian\-source\fR
|
If the package isn't found on this mirror, \fBpull\-debian\-source\fR
|
||||||
will fall back to the default mirror.
|
will fall back to the default mirror.
|
||||||
.TP
|
.TP
|
||||||
.BR \-n ", " \-\-no\-fallback
|
|
||||||
If specified, \fBpull\-debian\-source\fR won't fall back to the default
|
|
||||||
mirror, should it encounter an error.
|
|
||||||
.TP
|
|
||||||
.B \-\-no\-conf
|
.B \-\-no\-conf
|
||||||
Do not read any configuration files, or configuration from environment
|
Do not read any configuration files, or configuration from environment
|
||||||
variables.
|
variables.
|
||||||
@ -80,9 +76,6 @@ The default value for \fB\-\-debian\-mirror\fR.
|
|||||||
.TP
|
.TP
|
||||||
.BR PULL_DEBIAN_DEBDIFF_DEBSEC_MIRROR ", " UBUNTUTOOLS_DEBSEC_MIRROR
|
.BR PULL_DEBIAN_DEBDIFF_DEBSEC_MIRROR ", " UBUNTUTOOLS_DEBSEC_MIRROR
|
||||||
The default value for \fB\-\-debsec\-mirror\fR.
|
The default value for \fB\-\-debsec\-mirror\fR.
|
||||||
.TP
|
|
||||||
.BR PULL_DEBIAN_DEBDIFF_MIRROR_FALLBACK ", " UBUNTUTOOLS_MIRROR_FALLBACK
|
|
||||||
The default value for \fB\-\-no\-fallback\fR.
|
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR pull\-debian\-source (1),
|
.BR pull\-debian\-source (1),
|
||||||
|
@ -31,10 +31,6 @@ Should be in the form \fBhttp://ftp.debian.org/debian\fR.
|
|||||||
If the package isn't found on this mirror, \fBpull\-debian\-source\fR
|
If the package isn't found on this mirror, \fBpull\-debian\-source\fR
|
||||||
will fall back to the default mirror.
|
will fall back to the default mirror.
|
||||||
.TP
|
.TP
|
||||||
.BR \-n ", " \-\-no\-fallback
|
|
||||||
If specified, \fBpull\-debian\-source\fR won't fall back to the default
|
|
||||||
mirror, should it encounter an error.
|
|
||||||
.TP
|
|
||||||
.B \-\-no\-conf
|
.B \-\-no\-conf
|
||||||
Do not read any configuration files, or configuration from environment
|
Do not read any configuration files, or configuration from environment
|
||||||
variables.
|
variables.
|
||||||
@ -54,9 +50,6 @@ package\-wide variable.
|
|||||||
.TP
|
.TP
|
||||||
.BR PULL_DEBIAN_SOURCE_DEBIAN_MIRROR ", " UBUNTUTOOLS_DEBIAN_MIRROR
|
.BR PULL_DEBIAN_SOURCE_DEBIAN_MIRROR ", " UBUNTUTOOLS_DEBIAN_MIRROR
|
||||||
The default value for \fB\-\-mirror\fR.
|
The default value for \fB\-\-mirror\fR.
|
||||||
.TP
|
|
||||||
.BR PULL_DEBIAN_SOURCE_MIRROR_FALLBACK ", " UBUNTUTOOLS_MIRROR_FALLBACK
|
|
||||||
The default value for \fB\-\-no\-fallback\fR.
|
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ubuntu\-dev\-tools (5)
|
.BR ubuntu\-dev\-tools (5)
|
||||||
|
@ -56,11 +56,9 @@ def pull(package, version, unpack=False):
|
|||||||
urls = []
|
urls = []
|
||||||
if opts.debsec_mirror and opts.debsec_mirror != DEFAULT_DEBSEC_MIRROR:
|
if opts.debsec_mirror and opts.debsec_mirror != DEFAULT_DEBSEC_MIRROR:
|
||||||
urls.append(build_url(opts.debsec_mirror, package, version))
|
urls.append(build_url(opts.debsec_mirror, package, version))
|
||||||
if opts.fallback:
|
|
||||||
urls.append(build_url(DEFAULT_DEBSEC_MIRROR, package, version))
|
urls.append(build_url(DEFAULT_DEBSEC_MIRROR, package, version))
|
||||||
if opts.debian_mirror and opts.debian_mirror != DEFAULT_DEBIAN_MIRROR:
|
if opts.debian_mirror and opts.debian_mirror != DEFAULT_DEBIAN_MIRROR:
|
||||||
urls.append(build_url(opts.debian_mirror, package, version))
|
urls.append(build_url(opts.debian_mirror, package, version))
|
||||||
if opts.fallback:
|
|
||||||
urls.append(build_url(DEFAULT_DEBIAN_MIRROR, package, version))
|
urls.append(build_url(DEFAULT_DEBIAN_MIRROR, package, version))
|
||||||
|
|
||||||
for url in urls:
|
for url in urls:
|
||||||
@ -154,10 +152,6 @@ def main():
|
|||||||
dest='debsec_mirror',
|
dest='debsec_mirror',
|
||||||
help='Preferred Debian Security mirror '
|
help='Preferred Debian Security mirror '
|
||||||
'(default: http://security.debian.org)')
|
'(default: http://security.debian.org)')
|
||||||
p.add_option('-n', '--no-fallback',
|
|
||||||
dest='fallback', default=None, action='store_false',
|
|
||||||
help="If a custom mirror is provided and an error occurs "
|
|
||||||
"while downloading, don't fall back to the default")
|
|
||||||
p.add_option('--no-conf',
|
p.add_option('--no-conf',
|
||||||
dest='no_conf', default=False, action='store_true',
|
dest='no_conf', default=False, action='store_true',
|
||||||
help="Don't read config files or environment variables")
|
help="Don't read config files or environment variables")
|
||||||
@ -176,8 +170,6 @@ def main():
|
|||||||
opts.debian_mirror = config.get_value('DEBIAN_MIRROR')
|
opts.debian_mirror = config.get_value('DEBIAN_MIRROR')
|
||||||
if opts.debsec_mirror is None:
|
if opts.debsec_mirror is None:
|
||||||
opts.debsec_mirror = config.get_value('DEBSEC_MIRROR')
|
opts.debsec_mirror = config.get_value('DEBSEC_MIRROR')
|
||||||
if opts.fallback is None:
|
|
||||||
opts.fallback = config.get_value('MIRROR_FALLBACK', boolean=True)
|
|
||||||
|
|
||||||
Logger.normal('Downloading %s %s', package, version)
|
Logger.normal('Downloading %s %s', package, version)
|
||||||
if not pull(package, version, unpack=not opts.fetch_only):
|
if not pull(package, version, unpack=not opts.fetch_only):
|
||||||
|
@ -28,10 +28,9 @@ use AptPkg::Version;
|
|||||||
die("Please install 'devscripts'\n") if(! grep -x "$_/dget", split(':',$ENV{'PATH'}));
|
die("Please install 'devscripts'\n") if(! grep -x "$_/dget", split(':',$ENV{'PATH'}));
|
||||||
|
|
||||||
my($name) = basename($0);
|
my($name) = basename($0);
|
||||||
my($help, $mirror, $no_fallback, $no_conf);
|
my($help, $mirror, $no_conf);
|
||||||
GetOptions('h|help' => \$help,
|
GetOptions('h|help' => \$help,
|
||||||
'm|mirror=s' => \$mirror,
|
'm|mirror=s' => \$mirror,
|
||||||
'n|no-fallback' => \$no_fallback,
|
|
||||||
'no-conf' => \$no_conf,
|
'no-conf' => \$no_conf,
|
||||||
);
|
);
|
||||||
my($package) = $ARGV[0] || &usage(2);
|
my($package) = $ARGV[0] || &usage(2);
|
||||||
@ -56,16 +55,11 @@ if (! $no_conf) {
|
|||||||
$mirror = $config_values{'PULL_DEBIAN_SOURCE_DEBIAN_MIRROR'}
|
$mirror = $config_values{'PULL_DEBIAN_SOURCE_DEBIAN_MIRROR'}
|
||||||
|| $config_values{'UBUNTUTOOLS_DEBIAN_MIRROR'}
|
|| $config_values{'UBUNTUTOOLS_DEBIAN_MIRROR'}
|
||||||
if (! $mirror);
|
if (! $mirror);
|
||||||
if (! $no_fallback) {
|
|
||||||
my($v) = $config_values{'PULL_DEBIAN_SOURCE_MIRROR_FALLBACK'}
|
|
||||||
|| $config_values{'UBUNTUTOOLS_MIRROR_FALLBACK'};
|
|
||||||
$no_fallback = 1 if $v eq "no";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
my($default_mirror) = 'http://ftp.debian.org/debian';
|
my($default_mirror) = 'http://ftp.debian.org/debian';
|
||||||
my(@mirrors);
|
my(@mirrors);
|
||||||
push @mirrors, $mirror if $mirror;
|
push @mirrors, $mirror if $mirror && $mirror ne $default_mirror;
|
||||||
push @mirrors, $default_mirror if $mirror ne $default_mirror and !$no_fallback;
|
push @mirrors, $default_mirror;
|
||||||
|
|
||||||
my($release)=$ARGV[1] || 'unstable';
|
my($release)=$ARGV[1] || 'unstable';
|
||||||
$release=&convertCodeName($release);
|
$release=&convertCodeName($release);
|
||||||
@ -184,8 +178,6 @@ Options:
|
|||||||
-m DEBIAN_MIRROR, --mirror=DEBIAN_MIRROR
|
-m DEBIAN_MIRROR, --mirror=DEBIAN_MIRROR
|
||||||
Preferred Debian mirror
|
Preferred Debian mirror
|
||||||
(default: http://ftp.debian.org/debian)
|
(default: http://ftp.debian.org/debian)
|
||||||
-n, --no-fallback If a custom mirror is provided and an error occurs
|
|
||||||
while downloading, don't fall back to the default
|
|
||||||
--no-conf Don't read config files or environment variables
|
--no-conf Don't read config files or environment variables
|
||||||
EOF
|
EOF
|
||||||
exit($exit);
|
exit($exit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user