summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/Config.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-22 00:27:49 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-22 00:28:31 +0000
commitfcdc9d5967cbf861db391a777bb129afc2e2560b (patch)
tree68e13a27e47122ec4dcce465fe64323f745a8ea2 /lib/MGA/DrakISO/Config.pm
parentb52888b09904b607c8351da18affaf19e3690ee9 (diff)
downloaddrakiso-fcdc9d5967cbf861db391a777bb129afc2e2560b.tar
drakiso-fcdc9d5967cbf861db391a777bb129afc2e2560b.tar.gz
drakiso-fcdc9d5967cbf861db391a777bb129afc2e2560b.tar.bz2
drakiso-fcdc9d5967cbf861db391a777bb129afc2e2560b.tar.xz
drakiso-fcdc9d5967cbf861db391a777bb129afc2e2560b.zip
Numerous changes to support building classic installer ISOs:
- rename {media}{source} to {media}{label} and require the user to supply it o automatically add the LABEL= prefix, rather than removing it - rename {settings}{name} to {settings}{distro} - move get_system_root() to ISOBuild - CI builds use it as the urpmi-root - add new requirements in Config::check_config() - rename build_live_iso() to build_iso() and support CI builds o make output to file non-optional - we always want a file o add the DATE.txt file to the ISO image - modify prepare_iso_bootloader to support CI boot menus
Diffstat (limited to 'lib/MGA/DrakISO/Config.pm')
-rw-r--r--lib/MGA/DrakISO/Config.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/MGA/DrakISO/Config.pm b/lib/MGA/DrakISO/Config.pm
index f3cb706..2d7de1f 100644
--- a/lib/MGA/DrakISO/Config.pm
+++ b/lib/MGA/DrakISO/Config.pm
@@ -42,14 +42,14 @@ sub read_config {
if ($config_path && -e getcwd() . '/' . $config_path) {
$config_root = getcwd();
}
- print "using $config_root as directory root\n";
+ print "Using $config_root as directory root\n";
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";
put_in_hash($build, $cfg);
- print "loaded $config_path as config file\n";
+ print "Loaded $config_path as config file\n";
}
$build->{settings}{config_root} = $config_root;
}
@@ -61,8 +61,12 @@ sub check_config {
Pod::Usage::pod2usage();
}
#- check for minimum requirements
- ref $build->{media} && $build->{media}{storage} or die "no media storage definition\n";
- ref $build->{system} or die "no system definition\n";
+ $build->{settings}{arch}
+ or die "ERROR: you must specify an architecture\n";
+ ref $build->{media} && $build->{media}{storage}
+ or die "ERROR: you must specify the media storage type.\n";
+ $build->{media}{label}
+ or die "ERROR: you must supply a media label\n";
}
sub complete_config {