summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-04-12 12:32:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-04-12 12:32:59 +0000
commit35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1 (patch)
treee1b7d13bf598e16200e946ad780613e2bba96acc
parent70f46db30bb98d36d9b99b9b33b24448ae67c28d (diff)
downloaddrakx-35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1.tar
drakx-35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1.tar.gz
drakx-35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1.tar.bz2
drakx-35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1.tar.xz
drakx-35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1.zip
(ask_from_entries_refH_powered_normalize):
- when not_edit and empty list, die. - when not_edit and single element list, don't display that entry.
-rw-r--r--perl-install/interactive.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 596b40d15..567c2cef8 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -245,8 +245,12 @@ sub ask_from_entries_refH_powered_normalize {
$e->{disabled} ||= sub { 0 };
}
- #- don't display empty lists
- @$l = grep { !($_->{list} && @{$_->{list}} == () && $_->{not_edit}) } @$l;
+ #- don't display empty lists and one element lists
+ @$l = grep {
+ my $b = $_->{list} && $_->{not_edit};
+ @{$_->{list}} == () and die 'ask_from_list: empty list';
+ !($b && @{$_->{list}} <= 1);
+ } @$l;
$common->{advanced_label} ||= _("Advanced");
$common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages);