aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Resolve.pm
diff options
context:
space:
mode:
Diffstat (limited to 'URPM/Resolve.pm')
-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;