aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Resolve.pm
diff options
context:
space:
mode:
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r--URPM/Resolve.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 7a4ea5d..b6ceac6 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -882,7 +882,14 @@ sub resolve_requested {
my @selected = resolve_requested__no_suggests($urpm, $db, $state, $requested, %options);
if (!$options{no_suggests}) {
- my @todo = @selected;
+ @selected = resolve_requested_suggests($urpm, $db, $state, \@selected, %options);
+ }
+ @selected;
+}
+
+sub resolve_requested_suggests {
+ my ($urpm, $db, $state, $selected, %options) = @_;
+ my @todo = @$selected;
while (@todo) {
my $pkg = shift @todo;
my %suggests = map { $_ => 1 } $pkg->suggests or next;
@@ -908,11 +915,11 @@ sub resolve_requested {
my %new_requested = map { $_ => undef } keys %suggests;
my @new_selected = resolve_requested__no_suggests_($urpm, $db, $state, \%new_requested, %options);
$state->{selected}{$_->id}{suggested} = 1 foreach @new_selected;
- push @selected, @new_selected;
+ push @$selected, @new_selected;
push @todo, @new_selected;
}
- }
- @selected;
+
+ @$selected;
}
#- Resolve dependencies of requested packages; keep resolution state to