aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index a7e7f25..ccdf64c 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -20,7 +20,7 @@ sub find_candidate_packages {
#- check if at least one provide of the package overlap the property.
my $satisfied = 0;
foreach ($pkg->provides) {
- ranges_overlap($property, $_) and ++$satisfied, last;
+ ranges_overlap($_, $property) and ++$satisfied, last;
}
$satisfied and push @{$packages{$pkg->name}}, $pkg;
}
@@ -137,7 +137,8 @@ sub resolve_requested {
@chosen = values %$packages;
}
if (!$pkg && $options{callback_choices} && @chosen > 1) {
- $pkg ||= $options{callback_choices}->($urpm, $db, $state, \@chosen);
+ $pkg = $options{callback_choices}->($urpm, $db, $state, \@chosen);
+ $pkg or next; #- callback may decide to not continue (or state is already updated).
}
$pkg ||= $chosen[0];
$pkg && !$pkg->flag_requested && !$pkg->flag_required or next;