summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-09-14 09:54:43 +0000
committerOlivier Blin <oblin@mandriva.com>2009-09-14 09:54:43 +0000
commit6aed1cf619f5dbc2b3747902c04d5399052dfa06 (patch)
treeb9e36c7d9a0a53a60eae22989234cfea950c3249
parent7c7e9f4818ece1c20002d8b4c3aee9c575453648 (diff)
downloaddrakiso-6aed1cf619f5dbc2b3747902c04d5399052dfa06.tar
drakiso-6aed1cf619f5dbc2b3747902c04d5399052dfa06.tar.gz
drakiso-6aed1cf619f5dbc2b3747902c04d5399052dfa06.tar.bz2
drakiso-6aed1cf619f5dbc2b3747902c04d5399052dfa06.tar.xz
drakiso-6aed1cf619f5dbc2b3747902c04d5399052dfa06.zip
fix deref of undefined arrays
-rwxr-xr-xdraklive4
1 files changed, 2 insertions, 2 deletions
diff --git a/draklive b/draklive
index 44406bd..c95b08e 100755
--- a/draklive
+++ b/draklive
@@ -247,7 +247,7 @@ sub post_install_system {
}
#- additional rpms may have dependencies in additional media
- if (@{$live->{system}{rpms}}) {
+ if (@{$live->{system}{rpms} || []}) {
my $rpm_tmp_dir = '/tmp/draklive_rpms';
mkdir_p($live->get_system_root . $rpm_tmp_dir);
cp_f((map { $live->{settings}{config_root} . '/' . $_ } @{$live->{system}{rpms}}), $live->get_system_root . $rpm_tmp_dir);
@@ -261,7 +261,7 @@ sub post_install_system {
#- remove urpmi media added by drakx-in-chroot and additional media, they're unusable
run_({ root => $live->get_system_root }, 'urpmi.removemedia', '-a');
- my $erase = join(' ', @{$live->{system}{erase_rpms}});
+ my $erase = join(' ', @{$live->{system}{erase_rpms} || []});
run_({ root => $live->get_system_root, setarch => $live->{settings}{arch} },
'sh', '-c', "rpm -qa $erase | xargs rpm -e ") if $erase;