diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-01-11 16:57:50 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-01-11 16:57:50 +0000 |
commit | ecf6a5b1a5c272927455002bbfa98d762f1388da (patch) | |
tree | e4c7bfcda70042c93d43b695aabf165eb07506ba /urpmq | |
parent | 3c6714052c3bb51abeefa2a3a161759d1036f3f0 (diff) | |
download | urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar.gz urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar.bz2 urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar.xz urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.zip |
use uniq() and factorize
Diffstat (limited to 'urpmq')
-rwxr-xr-x | urpmq | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -27,6 +27,7 @@ use urpm; use urpm::args; use urpm::msg; use urpm::sys; +use urpm::util; use urpm::media; use urpm::select; use urpm::get_pkgs; @@ -332,13 +333,13 @@ if ($urpm::args::options{list_aliases}) { if (my @headers = (grep { ! -s "$urpm->{cachedir}/headers/$_" } map { my $pkg = $urpm->{depslist}[$_]; $pkg && $pkg->header_filename } @selected)) { + @headers = uniq(@headers); foreach my $medium (@{$urpm->{media} || []}) { if ($medium->{synthesis}) { $urpm->{log}->(N("skipping media %s: no hdlist", $medium->{name})); next; } - my %h = map { $_ => 1 } @headers; @headers = keys %h; my $hdlist_path = urpm::media::any_hdlist($urpm, $medium); if (-s $hdlist_path) { require MDV::Packdrakeng; |