From 55c9c2cede5d28651c30b83c087ca6a9276d7ddc Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 3 Sep 2008 16:33:26 +0000 Subject: if we use metalink, don't try various mirrors, aria2 will take care of everything --- urpm/media.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'urpm/media.pm') 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->(); } -- cgit v1.2.1