summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-30 03:29:18 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-30 03:29:18 +0000
commit49d000c9fa9d46a696732f2f1fec98574c8d4a5e (patch)
tree77dfe8b142e2b2838c06143f7d0c9608855739eb
parentc7c7c9503cf3299cbdb5addb27cf036ce5d83b4b (diff)
downloadurpmi-49d000c9fa9d46a696732f2f1fec98574c8d4a5e.tar
urpmi-49d000c9fa9d46a696732f2f1fec98574c8d4a5e.tar.gz
urpmi-49d000c9fa9d46a696732f2f1fec98574c8d4a5e.tar.bz2
urpmi-49d000c9fa9d46a696732f2f1fec98574c8d4a5e.tar.xz
urpmi-49d000c9fa9d46a696732f2f1fec98574c8d4a5e.zip
For source RPMs, allow to search precisely on package name, because they
don't have provides (bug 9365).
-rw-r--r--urpm.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index ccca9c1c..07f6b674 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2064,7 +2064,8 @@ sub search_packages {
($options{src} ? $pkg->arch eq 'src' : $pkg->is_arch_compat) or next;
- my $pack_ra = $pkg->name . '-' . $pkg->version;
+ my $pack_name = $pkg->name;
+ my $pack_ra = $pack_name . '-' . $pkg->version;
my $pack_a = "$pack_ra-" . $pkg->release;
my $pack = "$pack_a." . $pkg->arch;
@@ -2075,7 +2076,7 @@ sub search_packages {
} elsif ($pack_a eq $v) {
push @{$exact_a{$v}}, $id;
next;
- } elsif ($pack_ra eq $v) {
+ } elsif ($pack_ra eq $v || $options{src} && $pack_name eq $v) {
push @{$exact_ra{$v}}, $id;
next;
}