summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 3aca28ee..74eee1f2 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2119,7 +2119,12 @@ sub search_packages {
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.
- $exact{$v} = join '|', @l;
+ #- 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 '|', @l2;
+ } else {
+ $exact{$v} = join '|', @l;
+ }
next;
}
}