From fcdc9d5967cbf861db391a777bb129afc2e2560b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 22 Dec 2017 00:27:49 +0000 Subject: 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 --- lib/MGA/DrakISO/Config.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/MGA/DrakISO/Config.pm') 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 { -- cgit v1.2.1