From c1dafe4a6148465d85f2b64320b51549ece6dad7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 10 Oct 2013 13:00:31 +0200 Subject: fix "Can't use an undefined value as an ARRAY reference" in strict mode some fs (eg: btrfs) do not have a way to preserve the UUID this should explain some strange logs --- perl-install/fs/format.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm index 564180a0f..c331c398a 100644 --- a/perl-install/fs/format.pm +++ b/perl-install/fs/format.pm @@ -194,8 +194,10 @@ sub part_raw { delete $part->{device_LABEL_changed}; # Preserve UUID on fs where we couldn't enforce it while formatting - (undef, $cmd) = @{$preserve_UUID{$fs_type}}; - run_program::raw({}, $cmd, '-U', devices::make($dev)) if $cmd; + if (my $uuid_cmd = $preserve_UUID{$fs_type}) { + (undef, $cmd) = @$uuid_cmd; + run_program::raw({}, $cmd, '-U', devices::make($dev)) if $cmd; + } if (member($fs_type, qw(ext3 ext4))) { disable_forced_fsck($dev); -- cgit v1.2.1