summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-04-12 15:22:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-04-12 15:22:54 +0000
commit1002a97916b8da6957fd0080011a377818283b79 (patch)
tree97fc678baf6a158583a4124913ffdfeedede2fe5 /perl-install/interactive.pm
parent4c89b815bc4049be4293ffb7c5bbac7dcd751b2d (diff)
downloaddrakx-backup-do-not-use-1002a97916b8da6957fd0080011a377818283b79.tar
drakx-backup-do-not-use-1002a97916b8da6957fd0080011a377818283b79.tar.gz
drakx-backup-do-not-use-1002a97916b8da6957fd0080011a377818283b79.tar.bz2
drakx-backup-do-not-use-1002a97916b8da6957fd0080011a377818283b79.tar.xz
drakx-backup-do-not-use-1002a97916b8da6957fd0080011a377818283b79.zip
(ask_from_entries_refH_powered_normalize): fix the test for empty lists
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 187fbc82e..0ebe74434 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -247,9 +247,12 @@ sub ask_from_entries_refH_powered_normalize {
#- 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);
+ if ($_->{list} && $_->{not_edit}) {
+ @{$_->{list}} == () and die 'ask_from_list: empty list';
+ @{$_->{list}} > 1;
+ } else {
+ 1;
+ }
} @$l;
$common->{advanced_label} ||= _("Advanced");
@@ -261,6 +264,7 @@ sub ask_from_entries_refH_powered_normalize {
sub ask_from_entries_refH_powered {
my ($o, $common, $l) = @_;
ask_from_entries_refH_powered_normalize($o, $common, $l);
+
@$l or return 1;
$o->ask_from_entries_refW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]);
}