diff options
author | Francois Pons <fpons@mandriva.com> | 2003-07-21 11:11:42 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-07-21 11:11:42 +0000 |
commit | 0f5b9b335cfa33d811324afedad8ddb08020f37d (patch) | |
tree | 4070e19a9f0bb6aa92a2d6020c3f760a45c5eafa /urpm.pm | |
parent | 4b7e96a97bfce1251ccac8f2f43f1b85c11ecdb0 (diff) | |
download | urpmi-0f5b9b335cfa33d811324afedad8ddb08020f37d.tar urpmi-0f5b9b335cfa33d811324afedad8ddb08020f37d.tar.gz urpmi-0f5b9b335cfa33d811324afedad8ddb08020f37d.tar.bz2 urpmi-0f5b9b335cfa33d811324afedad8ddb08020f37d.tar.xz urpmi-0f5b9b335cfa33d811324afedad8ddb08020f37d.zip |
avoid proposing all provides if a package has the same name as the property
searched when calling URPM::search_packages.
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; } } |