summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-15 08:56:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-15 08:56:17 +0000
commit1845cc6b9018c85d0c0547362389307b4c5e7dac (patch)
tree37127bebe3a820c769ee58ff1a31730f13fc9b72
parent79b4dbe29da7619f21e8124b562c06b5628b94e1 (diff)
downloadurpmi-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)
-rw-r--r--urpm/select.pm9
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.
+ }
}
}
}