Mageia Bugzilla – Attachment 3601 Details for
Bug 8886
drakboot crashed (grub2 with uefi)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
install grub2-efi if needed
8886.diff (text/plain), 918 bytes, created by
Thierry Vignaud
on 2013-03-11 06:22:15 CET
(
hide
)
Description:
install grub2-efi if needed
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2013-03-11 06:22:15 CET
Size:
918 bytes
patch
obsolete
>diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index 7c372da..360f20c 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -2085,10 +2085,11 @@ sub install { > sub ensure_pkg_is_installed { > my ($do_pkgs, $bootloader) = @_; > >+ my %pkg = ('grub2' => glob_("/sys/firmware/efi/*") ? 'grub2-efi' : 'grub2'); > my %h = ('grub2' => 'grub2-install'); > my $main_method = main_method($bootloader->{method}); > if (member($main_method, qw(grub grub2 lilo))) { >- $do_pkgs->ensure_binary_is_installed($main_method, $h{$main_method} || $main_method, 1) or return 0; >+ $do_pkgs->ensure_binary_is_installed($pkg{$main_method} || $main_method, $h{$main_method} || $main_method, 1) or return 0; > if ($bootloader->{method} eq 'grub-graphic') { > $do_pkgs->ensure_is_installed('mageia-gfxboot-theme', '/usr/share/gfxboot/themes/Mageia/boot/message', 1) or return 0; > }
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 7c372da..360f20c 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2085,10 +2085,11 @@ sub install { sub ensure_pkg_is_installed { my ($do_pkgs, $bootloader) = @_; + my %pkg = ('grub2' => glob_("/sys/firmware/efi/*") ? 'grub2-efi' : 'grub2'); my %h = ('grub2' => 'grub2-install'); my $main_method = main_method($bootloader->{method}); if (member($main_method, qw(grub grub2 lilo))) { - $do_pkgs->ensure_binary_is_installed($main_method, $h{$main_method} || $main_method, 1) or return 0; + $do_pkgs->ensure_binary_is_installed($pkg{$main_method} || $main_method, $h{$main_method} || $main_method, 1) or return 0; if ($bootloader->{method} eq 'grub-graphic') { $do_pkgs->ensure_is_installed('mageia-gfxboot-theme', '/usr/share/gfxboot/themes/Mageia/boot/message', 1) or return 0; }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 8886
: 3601