From 4584ce5e29092d67ae718229d4a91b04de5ddca9 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 10 Jun 2005 03:21:41 +0000 Subject: Extract headers only once --- urpmq | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'urpmq') diff --git a/urpmq b/urpmq index da12eded..51f42a46 100755 --- a/urpmq +++ b/urpmq @@ -340,13 +340,14 @@ if ($urpm::args::options{list_aliases}) { my @selected = map { split /\|/ } keys %{$state->{selected}}; foreach (0..$#{$urpm->{media} || []}) { if ($urpm->{media}[$_]{synthesis}) { - $urpm->{log}->(N("skipping media %s: no hdlist\n", $urpm->{media}[$_]{name})); + $urpm->{log}->(N("skipping media %s: no hdlist", $urpm->{media}[$_]{name})); next; } if (my @headers = (grep { ! -s "$urpm->{cachedir}/headers/$_" } map { my $pkg = $urpm->{depslist}[$_]; $pkg && $pkg->header_filename } @selected)) { + my %h = map { $_ => 1 } @headers; @headers = keys %h; my $hdlist_path = $urpm->{media}[$_]{virtual} ? ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^(?:file:/*)?(/[^/].*)!)[0] : "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}"; -- cgit v1.2.1