From 58e0bcf583a5f425eb858b006be32ab4a25a8abf Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 28 Jul 2003 08:56:57 +0000 Subject: fixed absurd typo from me. --- urpm.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/urpm.pm b/urpm.pm index de3c94e5..fd8a178b 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2112,15 +2112,16 @@ sub search_packages { unless ($options{fuzzy}) { #- try to search through provides. if (my @l = map { $_ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat) && - ($options{use_provides} || $_->name eq $v) ? $_ : undef } map { $urpm->{depslist}[$_] } + ($options{use_provides} || $_->name eq $v) && defined $_->id ? + ($_) : @{[]} } map { $urpm->{depslist}[$_] } keys %{$urpm->{provides}{$v} || {}}) { #- we assume that if the there is at least one package providing the resource exactly, #- this should be the best ones that is described. #- but we first check if one of the packages has the same name as searched. if (my @l2 = grep { $_->name eq $v} @l) { - $exact{$v} = join '|', grep { defined $_ } map { $_->id } @l2; + $exact{$v} = join '|', map { $_->id } @l2; } else { - $exact{$v} = join '|', grep { defined $_ } map { $_->id } @l; + $exact{$v} = join '|', map { $_->id } @l; } next; } -- cgit v1.2.1