summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-20 01:17:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-20 01:17:20 +0000
commit4beb3c6f70e05e7c2cafd039bd3742637716ef73 (patch)
tree1509cfb2b96b07ea4fa088ce353d74809ad6f495 /perl-install
parent2d5ee5d016f682f357a075fa7c8e22868ff40f69 (diff)
downloaddrakx-backup-do-not-use-4beb3c6f70e05e7c2cafd039bd3742637716ef73.tar
drakx-backup-do-not-use-4beb3c6f70e05e7c2cafd039bd3742637716ef73.tar.gz
drakx-backup-do-not-use-4beb3c6f70e05e7c2cafd039bd3742637716ef73.tar.bz2
drakx-backup-do-not-use-4beb3c6f70e05e7c2cafd039bd3742637716ef73.tar.xz
drakx-backup-do-not-use-4beb3c6f70e05e7c2cafd039bd3742637716ef73.zip
have less warnings when debugging
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm4
-rw-r--r--perl-install/interactive/gtk.pm6
-rwxr-xr-xperl-install/standalone/diskdrake6
3 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index d9c4b2f3b..b06ebdee2 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -348,7 +348,7 @@ sub ask_from_normalize {
#- don't display empty lists and one element lists
@$l = grep {
if ($_->{list} && $_->{not_edit} && !$_->{allow_empty_list}) {
- if (@{$_->{list}} == ()) {
+ if (!@{$_->{list}}) {
eval {
require 'log.pm'; #- "require log" causes some pb, perl thinking that "log" is the log() function
log::l("ask_from_normalize: empty list for $_->{label}\n" . backtrace());
@@ -367,7 +367,7 @@ sub ask_from_normalize {
$common->{interactive_help} ||= $common->{interactive_help_id} && $o->interactive_help_sub_get_id($common->{interactive_help_id});
$common->{advanced_label} ||= N("Advanced");
$common->{advanced_label_close} ||= N("Basic");
- $common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages);
+ $common->{$_} = $common->{$_} ? [ deref($common->{$_}) ] : [] foreach qw(messages advanced_messages);
add2hash_($common->{callbacks} ||= {}, { changed => sub {}, focus_out => sub {}, complete => sub { 0 }, canceled => sub { 0 }, advanced => sub {} });
}
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 1951137a6..89b4b8f3d 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -352,7 +352,8 @@ sub ask_fromW {
my $mainw = ugtk2->new($common->{title}, %$o, if__($::main_window, transient => $::main_window));
#-the widgets
- my (@widgets, @widgets_always, @widgets_advanced, $advanced, $advanced_pack, $has_horiz_scroll, $has_scroll, $max_width);
+ my (@widgets, @widgets_always, @widgets_advanced, $advanced, $advanced_pack, $has_horiz_scroll, $has_scroll);
+ my $max_width = 0;
my $total_size = 0;
my $tooltips = Gtk2::Tooltips->new;
my $ok_clicked = sub {
@@ -393,7 +394,8 @@ sub ask_fromW {
};
my $changed = sub { $update->(sub { $common->{callbacks}{changed}($ind) }) };
- my ($w, $real_w, $focus_w, $set, $get, $expand, $size, $width);
+ my ($w, $real_w, $focus_w, $set, $get, $expand, $size);
+ my $width = 0;
if ($e->{type} eq 'iconlist') {
$w = Gtk2::Button->new;
$set = sub {
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 4d359cb09..24f20061f 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -75,10 +75,10 @@ $SIG{__DIE__} = sub { my $m = chomp_($_[0]); log::l("ERROR: $m") };
fs::get_raw_hds('', $all_hds);
-fs::merge_info_from_fstab([ fsedit::get_really_all_fstab($all_hds) ]);
-fs::merge_info_from_mtab([ fsedit::get_really_all_fstab($all_hds) ]);
+fs::merge_info_from_fstab([ fsedit::get_really_all_fstab($all_hds) ], '');
+fs::merge_info_from_mtab([ fsedit::get_really_all_fstab($all_hds) ], '');
-$all_hds->{current_fstab} = fs::fstab_to_string($all_hds);
+$all_hds->{current_fstab} = fs::fstab_to_string($all_hds, '');
if ($type eq 'hd') {
require diskdrake::interactive;