summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-07-28 08:56:57 +0000
committerFrancois Pons <fpons@mandriva.com>2003-07-28 08:56:57 +0000
commit58e0bcf583a5f425eb858b006be32ab4a25a8abf (patch)
treea34204a925fe122dc3dadb507d1edd5b11506f42 /urpm.pm
parentb3f6ae6a985392c2817cd0dbad93d4e204e6d7ea (diff)
downloadurpmi-58e0bcf583a5f425eb858b006be32ab4a25a8abf.tar
urpmi-58e0bcf583a5f425eb858b006be32ab4a25a8abf.tar.gz
urpmi-58e0bcf583a5f425eb858b006be32ab4a25a8abf.tar.bz2
urpmi-58e0bcf583a5f425eb858b006be32ab4a25a8abf.tar.xz
urpmi-58e0bcf583a5f425eb858b006be32ab4a25a8abf.zip
fixed absurd typo from me.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm7
1 files 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;
}