summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 47e25a75..53e47467 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -925,7 +925,9 @@ sub _create_metalink_ {
# Don't create a metalink when downloading mirror list
$medium or return;
- my $mirrors = $urpm->{mirrors_cache}{$medium->{mirrorlist}};
+ # only use the 8 best mirrors, then we let aria2 choose
+ require urpm::mirrors;
+ my @mirrors = map { _take_n_elem(8, @$_) } urpm::mirrors::list_urls($urpm, $medium, '');
my $metalinkfile = "$urpm->{cachedir}/$options->{media}.metalink";
# Even if not required by metalink spec, this line is needed at top of
@@ -936,9 +938,6 @@ sub _create_metalink_ {
'<files>',
);
- # only use the 8 best mirrors, then we let aria2 choose
- my @mirrors = _take_n_elem(8, @{$mirrors->{list}});
-
foreach my $rel_file (@$rel_files) {
my $i = 0;
my @lines = map {