summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-03 16:33:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-03 16:33:26 +0000
commit55c9c2cede5d28651c30b83c087ca6a9276d7ddc (patch)
treefcf6cc04d680c541fea691880dc82ad9a80edfb3 /urpm/media.pm
parentfab72ba35228c94186d8e998b7e4993e40131176 (diff)
downloadurpmi-55c9c2cede5d28651c30b83c087ca6a9276d7ddc.tar
urpmi-55c9c2cede5d28651c30b83c087ca6a9276d7ddc.tar.gz
urpmi-55c9c2cede5d28651c30b83c087ca6a9276d7ddc.tar.bz2
urpmi-55c9c2cede5d28651c30b83c087ca6a9276d7ddc.tar.xz
urpmi-55c9c2cede5d28651c30b83c087ca6a9276d7ddc.zip
if we use metalink, don't try various mirrors, aria2 will take care of everything
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 508a8292..94fb7f69 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1800,8 +1800,16 @@ sub try__maybe_mirrorlist {
my ($urpm, $medium, $try) = @_;
if ($medium->{mirrorlist}) {
- require urpm::mirrors;
- urpm::mirrors::try($urpm, $medium, $try);
+ $urpm->{allow_metalink} //= urpm::download::available_metalink_downloaders();
+ if ($urpm->{allow_metalink}) {
+ #- help things...
+ _pick_mirror_if_needed($urpm, $medium, 'allow-cache-update');
+
+ $try->();
+ } else {
+ require urpm::mirrors;
+ urpm::mirrors::try($urpm, $medium, $try);
+ }
} else {
$try->();
}