From 0f5b9b335cfa33d811324afedad8ddb08020f37d Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 21 Jul 2003 11:11:42 +0000 Subject: avoid proposing all provides if a package has the same name as the property searched when calling URPM::search_packages. --- urpm.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'urpm.pm') 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; } } -- cgit v1.2.1