summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--urpm/select.pm13
2 files changed, 13 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 49663fbe..a6bfd6b3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix package count when using -a and when some packages exist in several
+ repositories (eg: noarch packages) (mga#4322)
- translation updates
Version 6.43.1 - 23 January 2012
diff --git a/urpm/select.pm b/urpm/select.pm
index 958b4d0e..353451c6 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -111,6 +111,7 @@ sub _search_packages {
my (%exact, %exact_a, %exact_ra, %found, %foundi);
foreach my $v (@$names) {
my $qv = quotemeta $v;
+ my @found;
$qv = '(?i)' . $qv if $options{caseinsensitive};
if (!$options{fuzzy}) {
@@ -150,8 +151,16 @@ sub _search_packages {
next;
}
}
- $pack =~ /$qv/ and push @{$found{$v}}, $id;
- $pack =~ /$qv/i and push @{$foundi{$v}}, $id if !$options{caseinsensitive};
+ if ($pack =~ /$qv/) {
+ next if member($pack, @found);
+ push @found, $pack;
+ push @{$found{$v}}, $id;
+ }
+ if ($pack =~ /$qv/i) {
+ next if member($pack, @found);
+ push @found, $pack;
+ push @{$foundi{$v}}, $id if !$options{caseinsensitive};
+ }
}
}