summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-04-11 08:28:46 +0000
committerFrancois Pons <fpons@mandriva.com>2002-04-11 08:28:46 +0000
commitb5cea6e819a4b69a7c6affb1513a5866925890aa (patch)
treeccd02674bdb0bad1de4945c815c7c1c86578565c
parent12ff778b98e39bbf611a7cf52572978aabf58f82 (diff)
downloadurpmi-b5cea6e819a4b69a7c6affb1513a5866925890aa.tar
urpmi-b5cea6e819a4b69a7c6affb1513a5866925890aa.tar.gz
urpmi-b5cea6e819a4b69a7c6affb1513a5866925890aa.tar.bz2
urpmi-b5cea6e819a4b69a7c6affb1513a5866925890aa.tar.xz
urpmi-b5cea6e819a4b69a7c6affb1513a5866925890aa.zip
fixed searching package according to name.
-rw-r--r--urpm.pm22
-rw-r--r--urpmi.spec6
2 files changed, 19 insertions, 9 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;
+ }
}
}
diff --git a/urpmi.spec b/urpmi.spec
index 5423e05f..16b4cdc8 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 3.3
-Release: 24mdk
+Release: 25mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -144,6 +144,10 @@ fi
%changelog
+* Thu Apr 11 2002 François Pons <fpons@mandrakesoft.com> 3.3-25mdk
+- fixed a problem for searching package according to name when
+ nothing should be found but other package are proposed.
+
* Wed Apr 10 2002 François Pons <fpons@mandrakesoft.com> 3.3-24mdk
- fixed package that need to be upgraded but which is provided
by another package (Mesa and XFree86-libs).