diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-12-01 15:18:30 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-12-01 15:18:30 +0000 |
commit | 8cee0a022f700cb1e65a45fbeab658ed0532bb9e (patch) | |
tree | 877e97e03b2a23054744281d24253573e6c654dd | |
parent | 66f0cf091c3355983cd840afa08e6b0b050dc8b0 (diff) | |
download | drakiso-8cee0a022f700cb1e65a45fbeab658ed0532bb9e.tar drakiso-8cee0a022f700cb1e65a45fbeab658ed0532bb9e.tar.gz drakiso-8cee0a022f700cb1e65a45fbeab658ed0532bb9e.tar.bz2 drakiso-8cee0a022f700cb1e65a45fbeab658ed0532bb9e.tar.xz drakiso-8cee0a022f700cb1e65a45fbeab658ed0532bb9e.zip |
draklive2: cleanup and improve error messages.
-rwxr-xr-x | draklive2 | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -435,11 +435,9 @@ sub create_bootloader { my $boot_dir = $live->get_builddir . $live->{prefix}{build}{boot}; mkdir_p($boot_dir); - my $root = $live->get_system_root; - my $kernel = $live->find_kernel->{version}; - my $vmlinuz = $root . '/boot/vmlinuz-' . $kernel; - -e $vmlinuz or die "cannot find kernel $kernel\n"; + my $vmlinuz = $live->get_system_root . '/boot/vmlinuz-' . $kernel; + -e $vmlinuz or die "cannot find kernel $kernel in root system\n"; cp_f($vmlinuz, $boot_dir . '/vmlinuz'); my $grub2_dir = $boot_dir . '/grub2'; @@ -447,7 +445,7 @@ sub create_bootloader { my $font = get_absolute_path($live, $live->{media}{bootloader_font}); if (defined $font) { - -e $font or die "cannot find bootloader font $font\n"; + -e $font or die "cannot find bootloader font file $font\n"; } else { $font = '/usr/share/grub/unicode.pf2'; } @@ -459,7 +457,7 @@ sub create_bootloader { my $theme = get_absolute_path($live, $live->{media}{bootloader_theme}); if (defined $theme) { - -d $theme or die "cannot find bootloader theme $theme\n"; + -d $theme or die "cannot find bootloader theme directory $theme\n"; } else { $theme = '/boot/grub2/themes/maggy'; } @@ -475,7 +473,7 @@ sub create_bootloader { my $add_lang_menu = defined $live->{media}{bootloader_langs}; if ($add_lang_menu) { my $lang_names = get_absolute_path($live, $live->{media}{bootloader_langs}); - -e $lang_names or die "cannot find language name file $lang_names\n"; + -e $lang_names or die "cannot find bootloader language file $lang_names\n"; my @langs = eval(cat_($lang_names)) or die "error in language name file $lang_names\n"; MDK::Common::File::output_utf8($grub2_dir . '/lang-menu.cfg', build_lang_menu_cfg(@langs)); @@ -483,13 +481,13 @@ sub create_bootloader { mkdir_p($locale_dir); my $messages = get_absolute_path($live, $live->{media}{bootloader_messages}); - -d $messages or die "cannot find translated messages directory $messages\n"; + -d $messages or die "cannot find bootloader messages directory $messages\n"; cp_f(glob($messages . '/*.mo'), $locale_dir); } my $eltorito_img = get_absolute_path($live, $live->{media}{eltorito_img}); if (defined $eltorito_img) { - -e $eltorito_img or die "cannot find grub2 Eltorito boot image $eltorito_img\n"; + -e $eltorito_img or die "cannot find Eltorito boot image $eltorito_img\n"; cp_f($eltorito_img, $grub2_dir . '/eltorito.img'); } else { build_grub2_eltorito_img($live, $grub2_dir . '/eltorito.img'); @@ -523,7 +521,7 @@ sub create_bootloader { my $bootx64_efi = get_absolute_path($live, $live->{media}{bootx64_efi}); if (defined $bootx64_efi) { - -e $bootx64_efi or die "cannot find grub2 EFI boot image $bootx64_efi\n"; + -e $bootx64_efi or die "cannot find EFI boot image $bootx64_efi\n"; cp_f($bootx64_efi, $efi_boot_dir . '/bootx64.efi'); } else { build_grub2_bootx64_efi($live, $efi_boot_dir . '/bootx64.efi'); @@ -712,6 +710,7 @@ sub create_iso_master { -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'; + -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'; mkdir_p(dirname($dest)); |