diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-15 08:56:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-15 08:56:17 +0000 |
commit | 1845cc6b9018c85d0c0547362389307b4c5e7dac (patch) | |
tree | 37127bebe3a820c769ee58ff1a31730f13fc9b72 /urpm | |
parent | 79b4dbe29da7619f21e8124b562c06b5628b94e1 (diff) | |
download | urpmi-1845cc6b9018c85d0c0547362389307b4c5e7dac.tar urpmi-1845cc6b9018c85d0c0547362389307b4c5e7dac.tar.gz urpmi-1845cc6b9018c85d0c0547362389307b4c5e7dac.tar.bz2 urpmi-1845cc6b9018c85d0c0547362389307b4c5e7dac.tar.xz urpmi-1845cc6b9018c85d0c0547362389307b4c5e7dac.zip |
there is no reason search_packages should return multiple pkgs with same
fullname when using {provides}, and should not otherwise
(will cleanup duplication in next commit)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/select.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm index 5d0da66f..14ae77fc 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -179,9 +179,12 @@ sub search_packages { $best = $_; } } - $packages->{$best->id} = 1; - $urpm->{debug} and $urpm->{debug}("search_packages: found " . $best->fullname . " matching $v"); - $best->set_flag_skip(0); #- reset skip flag as manually selected. + my @l = grep { $_->fullname eq $best->fullname } @$_; + $packages->{join('|', map { $_->id } @l)} = 1; + foreach my $pkg (@l) { + $urpm->{debug} and $urpm->{debug}("search_packages: found " . $pkg->fullname . " matching $v"); + $pkg->set_flag_skip(0); #- reset skip flag as manually selected. + } } } } |