diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-04 07:23:18 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-04 07:23:18 +0000 |
commit | 22987d1b74628b9736c5261649ee03e2d4e33a64 (patch) | |
tree | 2afacc23d9568956996f9163118c3c7121f58061 | |
parent | 45f782ed7c8143af2e8560aa501f3798c358e28d (diff) | |
download | urpmi-22987d1b74628b9736c5261649ee03e2d4e33a64.tar urpmi-22987d1b74628b9736c5261649ee03e2d4e33a64.tar.gz urpmi-22987d1b74628b9736c5261649ee03e2d4e33a64.tar.bz2 urpmi-22987d1b74628b9736c5261649ee03e2d4e33a64.tar.xz urpmi-22987d1b74628b9736c5261649ee03e2d4e33a64.zip |
simplify
-rw-r--r-- | urpm/download.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index 0155f64c..550fe2f7 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -941,17 +941,18 @@ sub _create_metalink_ { my @mirrors = _take_n_elem(8, @{$mirrors->{list}}); foreach my $rel_file (@$rel_files) { - push @metalink, qq(\t<file name=") . basename($rel_file) . qq(">); - push @metalink, qq(\t\t<resources>); - my $i = 0; - push @metalink, map { + my @lines = map { $i++; - "\t\t\t" . _create_one_metalink_line($medium, $_, $rel_file, $i); + _create_one_metalink_line($medium, $_, $rel_file, $i); } @mirrors; - push @metalink, "\t\t</resources>"; - push @metalink, "\t</file>"; + push @metalink, + qq(\t<file name=") . basename($rel_file) . qq(">), + qq(\t\t<resources>), + (map { "\t\t\t$_" } @lines), + "\t\t</resources>", + "\t</file>"; } push @metalink, "</files>", "</metalink>"; |