From 45f1efa7832ed4a97dcc93b40aa2f49adf5d125d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 4 Dec 2012 16:28:54 +0000 Subject: (find_required_package) previous commit enables us to not reinvent packages_providing() --- URPM/Resolve.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'URPM') 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; -- cgit v1.2.1