diff options
author | Francois Pons <fpons@mandriva.com> | 2003-07-25 13:07:31 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-07-25 13:07:31 +0000 |
commit | 10a19eb43440666590e92b12cca53f7a9253bab3 (patch) | |
tree | b753f87f69cb2227e72bdf13b24bba1e5344df98 /urpm.pm | |
parent | 1020aa66abb46eb744983c94f01cab0cbb2768d5 (diff) | |
download | urpmi-10a19eb43440666590e92b12cca53f7a9253bab3.tar urpmi-10a19eb43440666590e92b12cca53f7a9253bab3.tar.gz urpmi-10a19eb43440666590e92b12cca53f7a9253bab3.tar.bz2 urpmi-10a19eb43440666590e92b12cca53f7a9253bab3.tar.xz urpmi-10a19eb43440666590e92b12cca53f7a9253bab3.zip |
fixed incorrect name lookup causing bad reference.
added removing visible log.
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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; } |