summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm22
1 files changed, 14 insertions, 8 deletions
diff --git a/urpm.pm b/urpm.pm
index 73157139..08c9cbc2 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1315,14 +1315,20 @@ sub search_packages {
#- search through provides to find if a provide match this one.
#- but manages choices correctly (as a provides may be virtual or
#- multiply defined.
- /$qv/ and push @{$found{$v}}, join '|', grep { defined $_ }
- map { my $pkg = $urpm->{params}{info}{$_};
- $pkg && ($options{src} ? $pkg->{arch} eq 'src' : $pkg->{arch} ne 'src') && $pkg->{id} || undef }
- keys %{$urpm->{params}{provides}{$_}};
- /$qv/i and push @{$found{$v}}, join '|', grep { defined $_ }
- map { my $pkg = $urpm->{params}{info}{$_};
- $pkg && ($options{src} ? $pkg->{arch} eq 'src' : $pkg->{arch} ne 'src') && $pkg->{id} || undef }
- keys %{$urpm->{params}{provides}{$_}};
+ if (/$qv/) {
+ my @list = grep { defined $_ }
+ map { my $pkg = $urpm->{params}{info}{$_};
+ $pkg && ($options{src} ? $pkg->{arch} eq 'src' : $pkg->{arch} ne 'src') && $pkg->{id} || undef }
+ keys %{$urpm->{params}{provides}{$_}};
+ @list > 0 and push @{$found{$v}}, join '|', @list;
+ }
+ if (/$qv/i) {
+ my @list = grep { defined $_ }
+ map { my $pkg = $urpm->{params}{info}{$_};
+ $pkg && ($options{src} ? $pkg->{arch} eq 'src' : $pkg->{arch} ne 'src') && $pkg->{id} || undef }
+ keys %{$urpm->{params}{provides}{$_}};
+ @list > 0 and push @{$found{$v}}, join '|', @list;
+ }
}
}