diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-10-10 13:00:31 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-10-10 13:14:46 +0200 |
commit | c1dafe4a6148465d85f2b64320b51549ece6dad7 (patch) | |
tree | f02fddb91eb512bdb1236e140f236d66569f9c34 /perl-install | |
parent | f1fe1eb9121708a56fa2b835fdb381e9de16d37d (diff) | |
download | drakx-c1dafe4a6148465d85f2b64320b51549ece6dad7.tar drakx-c1dafe4a6148465d85f2b64320b51549ece6dad7.tar.gz drakx-c1dafe4a6148465d85f2b64320b51549ece6dad7.tar.bz2 drakx-c1dafe4a6148465d85f2b64320b51549ece6dad7.tar.xz drakx-c1dafe4a6148465d85f2b64320b51549ece6dad7.zip |
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
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/fs/format.pm | 6 |
1 files changed, 4 insertions, 2 deletions
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); |