diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-01 12:09:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-01 12:09:22 +0000 |
commit | 043e982c5c5246a9f9d64b398df769e0490961ab (patch) | |
tree | aa64fd59505559ce489483248d2fd776d141a5fd | |
parent | 4354c5dea8828ddd52daacc4cd4344e183257782 (diff) | |
download | urpmi-043e982c5c5246a9f9d64b398df769e0490961ab.tar urpmi-043e982c5c5246a9f9d64b398df769e0490961ab.tar.gz urpmi-043e982c5c5246a9f9d64b398df769e0490961ab.tar.bz2 urpmi-043e982c5c5246a9f9d64b398df769e0490961ab.tar.xz urpmi-043e982c5c5246a9f9d64b398df769e0490961ab.zip |
cleanup
-rw-r--r-- | urpm/download.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index 8adc79c1..8086bd20 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -611,13 +611,11 @@ sub sync_aria2 { chdir $options->{dir}; my ($buf, $_total, $file) = ('', undef, undef); - my @files; - foreach my $metalinkfile (@_) { + my @files = uniq(map { + my $metalinkfile = $_; $metalinkfile =~ s/metalink:.*/metalink/; - if (! grep { $_ eq $metalinkfile } @files) { - push(@files, $metalinkfile); - } - } + $metalinkfile; + } @_); my $aria2c_command = join(" ", map { "'$_'" } "/usr/bin/aria2c", |