aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-04 16:28:54 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-04 16:28:54 +0000
commit45f1efa7832ed4a97dcc93b40aa2f49adf5d125d (patch)
tree5877242901fa00fe776700490da38f8db2201de2
parent980043751ce9b571c918736285ad455337614a29 (diff)
downloadperl-URPM-45f1efa7832ed4a97dcc93b40aa2f49adf5d125d.tar
perl-URPM-45f1efa7832ed4a97dcc93b40aa2f49adf5d125d.tar.gz
perl-URPM-45f1efa7832ed4a97dcc93b40aa2f49adf5d125d.tar.bz2
perl-URPM-45f1efa7832ed4a97dcc93b40aa2f49adf5d125d.tar.xz
perl-URPM-45f1efa7832ed4a97dcc93b40aa2f49adf5d125d.zip
(find_required_package) previous commit enables us to not reinvent packages_providing()
-rw-r--r--URPM/Resolve.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 09fffc5..a7496de 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -217,12 +217,11 @@ sub find_required_package {
$may_add_to_packages->($pkg);
} elsif (my $name = property2name($_)) {
my $property = $_;
- foreach (sort { $a <=> $b } keys %{$urpm->{provides}{$name} || {}}) {
- my $pkg = $urpm->{depslist}[$_];
+ foreach my $pkg (packages_providing($urpm, $name)) {
$pkg->is_arch_compat or next;
$pkg->flag_skip || $state->{rejected}{$pkg->fullname} and next;
#- check if at least one provide of the package overlaps the property
- if (!$urpm->{provides}{$name}{$_} || $pkg->provides_overlap($property)) {
+ if (!$urpm->{provides}{$name}{$pkg->id} || $pkg->provides_overlap($property)) {
#- determine if this package is better than a possibly previously chosen package.
$pkg->flag_selected || exists $state->{selected}{$pkg->id} and return [$pkg];
!$strict_arch || strict_arch_check_installed($db, $pkg) or next;