summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/BuildISO.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-01-04 12:30:38 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-01-04 12:31:48 +0000
commit04e2b14c395ede7933addb7c4c68e1eca35468c8 (patch)
treeaf1ab2715e11d3003e59bfec0e0da440899b42fc /lib/MGA/DrakISO/BuildISO.pm
parent0a90f0baf2b522b2c74278e0e7dcd3e3ff97bca5 (diff)
downloaddrakiso-04e2b14c395ede7933addb7c4c68e1eca35468c8.tar
drakiso-04e2b14c395ede7933addb7c4c68e1eca35468c8.tar.gz
drakiso-04e2b14c395ede7933addb7c4c68e1eca35468c8.tar.bz2
drakiso-04e2b14c395ede7933addb7c4c68e1eca35468c8.tar.xz
drakiso-04e2b14c395ede7933addb7c4c68e1eca35468c8.zip
Improved documentation and error messages.
Diffstat (limited to 'lib/MGA/DrakISO/BuildISO.pm')
-rw-r--r--lib/MGA/DrakISO/BuildISO.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm
index 54edaff..41f562a 100644
--- a/lib/MGA/DrakISO/BuildISO.pm
+++ b/lib/MGA/DrakISO/BuildISO.pm
@@ -19,9 +19,7 @@
# SYNOPSIS
# --------
-# This module provides a function to build the ISO image. All the files
-# to go on the ISO should be stored in or linked into the build directory
-# before performing this step.
+# This package provides a function to finally build the ISO image.
package MGA::DrakISO::BuildISO;
@@ -40,9 +38,10 @@ use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(build_iso);
-# This is the top-level function called to build an iso image. It generates
+# This is the top-level function called to build an ISO image. It generates
# the list of file assignments before calling build_iso_image() to do the
-# actual work.
+# actual work. All the files to go on the ISO should be stored in or linked
+# into the build directory before calling this function.
#
sub build_iso {
my ($build) = @_;
@@ -101,10 +100,10 @@ sub build_iso_image {
my $arch = $build->{settings}{arch};
my $mbr_image = $build->get_absolute_path($build->{media}{mbr_boot_img}) // '/usr/lib/grub/i386-pc/boot_hybrid.img';
- -e $mbr_image or die "cannot find MBR boot image $mbr_image\n";
+ -e $mbr_image or die "ERROR: cannot find MBR boot image $mbr_image\n";
my $esp_image = $build->get_builddir('images') . '/esp.img';
- -e $esp_image || $arch ne 'x86_64' or die "cannot find ESP image $esp_image\n";
+ -e $esp_image || $arch ne 'x86_64' or die "ERROR: cannot find ESP image $esp_image\n";
my $build_dir = $build->get_builddir('dist');
mkdir_p($build_dir);
@@ -148,7 +147,7 @@ sub build_iso_image {
'-o', $dest,
@opts,
'/DATE.txt=' . $date_file,
- ) or die "unable to run xorrisofs\n";
+ ) or die "ERROR: unable to run xorrisofs\n";
my $filename = basename($dest);
run_('mgaiso-addmd5', '>', '/dev/null', '2>', '/dev/null', $dest);