From 8604d137143ed3dfd2abecb718a32c31bb0dac48 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 22 Dec 2017 17:35:31 +0000 Subject: Move handling of copy_from_repo list to prepare_iso_bootloader(). This allows it to be used for Live ISOs too. --- lib/MGA/DrakISO/BuildBoot.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/MGA/DrakISO/BuildBoot.pm') diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm index e52519c..bcf07ea 100755 --- a/lib/MGA/DrakISO/BuildBoot.pm +++ b/lib/MGA/DrakISO/BuildBoot.pm @@ -74,6 +74,16 @@ sub prepare_live_system_boot { sub prepare_iso_bootloader { my ($build) = @_; + # If the user has supplied a list of files to copy from the repository, + # do that now. We may need some of those files to correctly auto-detect + # the default kernel and initrd. + my $repo_prefix = $build->{settings}{repository} . '/' . $build->{settings}{arch} . '/'; + my $copy_prefix = $build->get_builddir . '/'; + foreach (group_by2(@{$build->{copy_from_repo}})) { + my ($src, $dst) = @$_; + copy_or_link($repo_prefix . $src, $copy_prefix . $dst); + } + # Create a subdirectory to hold the grub2 bootloader. my $grub2_dir = $build->get_builddir('boot') . '/grub2'; mkdir_p($grub2_dir); -- cgit v1.2.1