summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/BuildISO.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-18 21:23:57 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-18 21:23:57 +0000
commit996706b13c0354ae98e08f4cd54eae2a5868434c (patch)
treebabaa5bcfbc3a51d6e0849757e5b3629a48a8047 /lib/MGA/DrakISO/BuildISO.pm
parentcd2fe6bf1129641d59614d6382c5819acd8252e4 (diff)
downloaddrakiso-996706b13c0354ae98e08f4cd54eae2a5868434c.tar
drakiso-996706b13c0354ae98e08f4cd54eae2a5868434c.tar.gz
drakiso-996706b13c0354ae98e08f4cd54eae2a5868434c.tar.bz2
drakiso-996706b13c0354ae98e08f4cd54eae2a5868434c.tar.xz
drakiso-996706b13c0354ae98e08f4cd54eae2a5868434c.zip
Remove ability to override default directory names.
It's unlikely anyone would want to do this, and it makes the code considerably harder to read.
Diffstat (limited to 'lib/MGA/DrakISO/BuildISO.pm')
-rwxr-xr-xlib/MGA/DrakISO/BuildISO.pm27
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm
index 9b7e503..6f983ab 100755
--- a/lib/MGA/DrakISO/BuildISO.pm
+++ b/lib/MGA/DrakISO/BuildISO.pm
@@ -46,10 +46,10 @@ sub build_live_iso {
my $mbr_image = $live->get_absolute_path($live->{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";
- my $esp_image = $live->get_builddir . $live->{prefix}{build}{images} . '/esp.img';
+ my $esp_image = $live->get_builddir('images') . '/esp.img';
-e $esp_image or die "cannot find ESP image $esp_image\n";
- my $dest = $live->get_builddir . $live->{prefix}{build}{dist} . '/' . $live->get_name . '.iso';
+ my $dest = $live->get_builddir('dist') . '/' . $live->get_name . '.iso';
mkdir_p(dirname($dest));
build_iso_image(
@@ -58,21 +58,19 @@ sub build_live_iso {
$label,
$mbr_image,
$esp_image,
- $live->get_media_prefix('boot') . '=' . $live->get_builddir . $live->{prefix}{build}{boot},
+ '/boot=' . $live->get_builddir('boot'),
if_($live->{settings}{arch} eq 'x86_64',
- $live->get_media_prefix('EFI') . '=' . $live->get_builddir . $live->{prefix}{build}{EFI},
+ '/EFI=' . $live->get_builddir('EFI'),
),
(
map {
- $live->get_media_prefix('loopbacks') . $_ .
- '=' .
- $live->get_builddir . $live->{prefix}{build}{loopbacks} . $_;
+ '/loopbacks' . $_ . '=' . $live->get_builddir('loopbacks') . $_;
} list_selected_loopbacks($live)
),
if_($live->{media}{files},
map {
- $_ . '=' . $live->get_builddir . $live->{prefix}{build}{files} . '/' . $_;
- } all($live->get_builddir . $live->{prefix}{build}{files})
+ $_ . '=' . $live->get_builddir('files') . '/' . $_;
+ } all($live->get_builddir('files'))
),
);
}
@@ -82,7 +80,7 @@ sub list_selected_loopbacks {
my @pack = $live->{settings}{pack} ? @{$live->{packs}{$live->{settings}{pack}} || []} : ();
my @pack_modules = grep { member($_->{name}, @pack) } list_loopback_modules($live);
(map { $loop_types{$_->{type}}{is_loopback} && $_->{path} ? $_->{path} . $loop_types{$_->{type}}{extension} : () } @{$live->{mount}{dirs} || []}),
- (map { $live->{prefix}{build}{modules} . '/' . $_->{name} . $loop_types{$_->{type}}{extension} } @pack_modules);
+ (map { '/modules/' . $_->{name} . $loop_types{$_->{type}}{extension} } @pack_modules);
}
###############################################################################
@@ -111,19 +109,16 @@ sub list_selected_loopbacks {
sub build_iso_image {
my ($live, $dest, $label, $mbr_image, $esp_image, @opts) = @_;
- my $boot = $live->get_media_prefix('boot'); # normally '/boot'
- my $EFI = $live->get_media_prefix('EFI'); # normally '/EFI'
-
run_('xorrisofs',
'-pad', '-l', '-R', '-J',
'-V', $label,
'-graft-points',
'-hide-rr-moved',
'--sort-weight', 0, '/',
- '--sort-weight', 1, $boot,
+ '--sort-weight', 1, '/boot',
# for hybrid MBR boot
'--grub2-mbr', $mbr_image,
- '-b', "$boot/grub2/eltorito.img",
+ '-b', '/boot/grub2/eltorito.img',
'-no-emul-boot',
'-boot-load-size', 4,
'-boot-info-table',
@@ -131,7 +126,7 @@ sub build_iso_image {
if_($live->{settings}{arch} eq 'x86_64',
# for DVD UEFI boot
'-eltorito-alt-boot',
- '-e', "$EFI/BOOT/bootx64.efi",
+ '-e', '/EFI/BOOT/bootx64.efi',
'-no-emul-boot',
# for USB UEFI boot
'-part_like_isohybrid',