summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-07-25 13:07:31 +0000
committerFrancois Pons <fpons@mandriva.com>2003-07-25 13:07:31 +0000
commit10a19eb43440666590e92b12cca53f7a9253bab3 (patch)
treeb753f87f69cb2227e72bdf13b24bba1e5344df98
parent1020aa66abb46eb744983c94f01cab0cbb2768d5 (diff)
downloadurpmi-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.
-rw-r--r--urpm.pm9
1 files changed, 4 insertions, 5 deletions
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;
}