summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-01-11 16:57:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-01-11 16:57:50 +0000
commitecf6a5b1a5c272927455002bbfa98d762f1388da (patch)
treee4c7bfcda70042c93d43b695aabf165eb07506ba
parent3c6714052c3bb51abeefa2a3a161759d1036f3f0 (diff)
downloadurpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar
urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar.gz
urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar.bz2
urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.tar.xz
urpmi-ecf6a5b1a5c272927455002bbfa98d762f1388da.zip
use uniq() and factorize
-rwxr-xr-xurpmq3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpmq b/urpmq
index e5572396..9160502f 100755
--- a/urpmq
+++ b/urpmq
@@ -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;