From 10a19eb43440666590e92b12cca53f7a9253bab3 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 25 Jul 2003 13:07:31 +0000 Subject: fixed incorrect name lookup causing bad reference. added removing visible log. --- urpm.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 74eee1f2..26c091ef 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2113,17 +2113,16 @@ sub search_packages { unless ($options{fuzzy}) { #- try to search through provides. - if (my @l = grep { defined $_ } map { $_ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat) && - ($options{use_provides} || $_->name eq $v) ? - $_->id : undef } map { $urpm->{depslist}[$_] } + if (my @l = map { $_ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat) && + ($options{use_provides} || $_->name eq $v) ? $_ : undef } 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 '|', @l2; + $exact{$v} = join '|', grep { defined $_ } map { $_->id } @l2; } else { - $exact{$v} = join '|', @l; + $exact{$v} = join '|', grep { defined $_ } map { $_->id } @l; } next; } -- cgit v1.2.1