aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-02-27 13:13:15 +0000
committerFrancois Pons <fpons@mandriva.com>2003-02-27 13:13:15 +0000
commitfe7f158b2ea0194a3f89a21ce426a7cbab515b5c (patch)
treec94462aa35fe8ad903acd86634e969e6111cc506 /URPM
parent63bb546235800174f76babe8d14cc74298b9936d (diff)
downloadperl-URPM-fe7f158b2ea0194a3f89a21ce426a7cbab515b5c.tar
perl-URPM-fe7f158b2ea0194a3f89a21ce426a7cbab515b5c.tar.gz
perl-URPM-fe7f158b2ea0194a3f89a21ce426a7cbab515b5c.tar.bz2
perl-URPM-fe7f158b2ea0194a3f89a21ce426a7cbab515b5c.tar.xz
perl-URPM-fe7f158b2ea0194a3f89a21ce426a7cbab515b5c.zip
allow choices to return multiple selection.
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index ae4d5b4..289fd7c 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -261,8 +261,8 @@ sub resolve_requested {
(sort { $a->id <=> $b->id } @chosen_other),
(sort { $a->id <=> $b->id } @chosen_bad_locales));
if (!$pkg && $options{callback_choices} && @chosen > 1) {
- $pkg = $options{callback_choices}->($urpm, $db, $state, \@chosen);
- $pkg or next; #- callback may decide to not continue (or state is already updated).
+ unshift @properties, map { $_->id } grep { ref $_ } $options{callback_choices}->($urpm, $db, $state, \@chosen);
+ next; #- always redo according to choices.
}
$pkg ||= $chosen[0];
!$pkg || $pkg->flag_selected || exists $state->{selected}{$pkg->id} and next;