Mageia Bugzilla – Attachment 14241 Details for
Bug 32686
aarch64 installer fails trying to install grub2-efi(x86_64)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
(get_grub2_pkg) split it out
0001-get_grub2_pkg-split-it-out.patch (text/plain), 1.80 KB, created by
Thierry Vignaud
on 2024-01-04 17:29:45 CET
(
hide
)
Description:
(get_grub2_pkg) split it out
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2024-01-04 17:29:45 CET
Size:
1.80 KB
patch
obsolete
>From 865301ccf99cc1d86b09e00172533aeed68b0cae Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Thu, 4 Jan 2024 17:17:19 +0100 >Subject: [PATCH 1/2] (get_grub2_pkg) split it out > >--- > perl-install/bootloader.pm | 25 +++++++++++++++---------- > 1 file changed, 15 insertions(+), 10 deletions(-) > >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index ad7850d40..d1d757c3d 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -2637,6 +2637,20 @@ sub install { > run_program::run('umount', $efivars) if is_uefi() && !$already_mounted; > } > >+sub get_grub2_pkg() { >+ my ($prefix, $pkg); >+ if (is_uefi()) { >+ my %convert = (ia32 => 'i386', aa64 => 'arm64', x64 => 'x86_64'); >+ my %pkgs = (ia32 => 'x86-32', aa64 => 'aarch-64', x64 => 'x86-64'); >+ $prefix = $convert{uefi_type()} . "-efi"; >+ $pkg = "grub2-efi(" . $pkgs{uefi_type()} . ")"; >+ } else { >+ $prefix = 'i386-pc'; >+ $pkg = 'grub2'; >+ } >+ ($prefix, $pkg); >+} >+ > sub ensure_pkg_is_installed { > my ($do_pkgs, $bootloader) = @_; > >@@ -2647,16 +2661,7 @@ sub ensure_pkg_is_installed { > ); > my $main_method = main_method($bootloader->{method}); > if ($main_method eq 'grub2') { >- my ($prefix, $pkg); >- if (is_uefi()) { >- my %convert = (ia32 => 'i386', aa64 => 'arm64', x64 => 'x86_64'); >- my %pkgs = (ia32 => 'x86-32', aa64 => 'aarch-64', x64 => 'x86-64'); >- $prefix = $convert{uefi_type()} . "-efi"; >- $pkg = "grub2-efi(" . $pkgs{uefi_type()} . ")"; >- } else { >- $prefix = 'i386-pc'; >- $pkg = 'grub2'; >- } >+ my ($prefix, $pkg) = get_grub2_pkg(); > $do_pkgs->ensure_is_installed($pkg, "/usr/lib/grub/$prefix/ext2.mod", 1) or return 0; > } elsif ($main_method eq 'refind') { > $do_pkgs->ensure_is_installed('refind', '/sbin/refind-install', 1) or return 0; >-- >2.43.0 >
From 865301ccf99cc1d86b09e00172533aeed68b0cae Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Thu, 4 Jan 2024 17:17:19 +0100 Subject: [PATCH 1/2] (get_grub2_pkg) split it out --- perl-install/bootloader.pm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index ad7850d40..d1d757c3d 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2637,6 +2637,20 @@ sub install { run_program::run('umount', $efivars) if is_uefi() && !$already_mounted; } +sub get_grub2_pkg() { + my ($prefix, $pkg); + if (is_uefi()) { + my %convert = (ia32 => 'i386', aa64 => 'arm64', x64 => 'x86_64'); + my %pkgs = (ia32 => 'x86-32', aa64 => 'aarch-64', x64 => 'x86-64'); + $prefix = $convert{uefi_type()} . "-efi"; + $pkg = "grub2-efi(" . $pkgs{uefi_type()} . ")"; + } else { + $prefix = 'i386-pc'; + $pkg = 'grub2'; + } + ($prefix, $pkg); +} + sub ensure_pkg_is_installed { my ($do_pkgs, $bootloader) = @_; @@ -2647,16 +2661,7 @@ sub ensure_pkg_is_installed { ); my $main_method = main_method($bootloader->{method}); if ($main_method eq 'grub2') { - my ($prefix, $pkg); - if (is_uefi()) { - my %convert = (ia32 => 'i386', aa64 => 'arm64', x64 => 'x86_64'); - my %pkgs = (ia32 => 'x86-32', aa64 => 'aarch-64', x64 => 'x86-64'); - $prefix = $convert{uefi_type()} . "-efi"; - $pkg = "grub2-efi(" . $pkgs{uefi_type()} . ")"; - } else { - $prefix = 'i386-pc'; - $pkg = 'grub2'; - } + my ($prefix, $pkg) = get_grub2_pkg(); $do_pkgs->ensure_is_installed($pkg, "/usr/lib/grub/$prefix/ext2.mod", 1) or return 0; } elsif ($main_method eq 'refind') { $do_pkgs->ensure_is_installed('refind', '/sbin/refind-install', 1) or return 0; -- 2.43.0
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32686
: 14241 |
14242
|
14243