summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-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->();
}