From 04e2b14c395ede7933addb7c4c68e1eca35468c8 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Thu, 4 Jan 2018 12:30:38 +0000 Subject: Improved documentation and error messages. --- lib/MGA/DrakISO/BuildISO.pm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lib/MGA/DrakISO/BuildISO.pm') 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); -- cgit v1.2.1