diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-09 23:34:24 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-10 00:38:35 +0000 |
commit | 57060f5254e48a9eead04426803d4f102f2b0a4b (patch) | |
tree | 3dc19e87420be8334dd7411c91fdfd8c8984df5b /lib/MGA/DrakISO/Config.pm | |
parent | 63555aa270059488b013e6c802cca64a8d6eebdc (diff) | |
download | drakiso-57060f5254e48a9eead04426803d4f102f2b0a4b.tar drakiso-57060f5254e48a9eead04426803d4f102f2b0a4b.tar.gz drakiso-57060f5254e48a9eead04426803d4f102f2b0a4b.tar.bz2 drakiso-57060f5254e48a9eead04426803d4f102f2b0a4b.tar.xz drakiso-57060f5254e48a9eead04426803d4f102f2b0a4b.zip |
Miscellaneous code cleanup.
Diffstat (limited to 'lib/MGA/DrakISO/Config.pm')
-rw-r--r-- | lib/MGA/DrakISO/Config.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/MGA/DrakISO/Config.pm b/lib/MGA/DrakISO/Config.pm index a3d0511..e78d595 100644 --- a/lib/MGA/DrakISO/Config.pm +++ b/lib/MGA/DrakISO/Config.pm @@ -44,7 +44,7 @@ sub read_config { add2hash($build->{settings} ||= {}, { getVarsFromSh($config_root . '/' . $settings_path) }) if $settings_path; if ($config_path) { #- don't use do(), since it can't see lexicals in the enclosing scope - my $cfg = eval(cat_($config_root . '/' . $config_path)) or die "unable to load $config_path: $@\n"; + my $cfg = eval(cat_($config_root . '/' . $config_path)) or die "ERROR: unable to load $config_path: $@\n"; put_in_hash($build, $cfg); print "Loaded $config_path as config file\n"; } @@ -61,7 +61,7 @@ sub check_config { $build->{settings}{arch} or die "ERROR: you must specify an architecture\n"; $build->{media}{storage} - or die "ERROR: you must specify the media storage type.\n"; + or die "ERROR: you must specify the media storage type\n"; $build->{media}{label} or die "ERROR: you must supply a media label\n"; } @@ -71,9 +71,7 @@ sub complete_config { $build->{settings}{workdir} ||= '/var/lib/drakiso'; - $build->{settings}{arch} ||= chomp_(`rpm --eval '%{_target_cpu}'`); - - mkdir_p($build->get_builddir); + mkdir_p($build->get_build_dir); mkdir_p($build->get_chroot_dir); } |