diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-07 17:44:48 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-07 17:44:48 +0200 |
commit | e75a01510f0c0ac105d03d6e95f6aa046197e614 (patch) | |
tree | 71932fc5e68fc82197f7636d6d3e8d292ab706b1 /perl-install | |
parent | e45e81c4c2d10dfdd7e3b90f489a2d8172b74938 (diff) | |
download | drakx-e75a01510f0c0ac105d03d6e95f6aa046197e614.tar drakx-e75a01510f0c0ac105d03d6e95f6aa046197e614.tar.gz drakx-e75a01510f0c0ac105d03d6e95f6aa046197e614.tar.bz2 drakx-e75a01510f0c0ac105d03d6e95f6aa046197e614.tar.xz drakx-e75a01510f0c0ac105d03d6e95f6aa046197e614.zip |
fix selecting grub2-efi on UEFI (mga#18646)
the issue is that we select basesystem which pulls bootloader -> grub2
then later grub2-efi b/c we're on UEFI which results in:
we don't use the right API for selecting packages which results in:
* preferring grub2 over lilo,grub2-efi,grub
* replacing bootloader with grub2
* selecting grub2-2.02-0.git10457.6.mga6.x86_64
(...)
* selecting grub2-efi because of needed for UEFI boot
(...)
* no packages match grub2-efi (it is either in skip.list or already rejected)
* ERROR: selection failed: grub2-efi-2.02-0.git10457.6.mga6.x86_64 (due
to conflicts with grub2-2.02-0.git10457.6.mga6.x86_64)
the proper fix would be to use a better URPM API but it's just as simple
to pick the bootloader before picking basesystem...
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/any.pm | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 3596ca9de..fd1551927 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- fix selecting grub2-efi on UEFI (mga#18646) + Version 17.34.1 - 6 June 2016 - fix displaying release notes with WebKit2 diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index c6a226e7e..20fd25bc3 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -612,6 +612,7 @@ sub setPackages { install::pkgs::select_by_package_names($urpm, [ $devel_kernel_pkg ], 1); } + install::pkgs::select_by_package_names_or_die($urpm, default_bootloader(), 1); install::pkgs::select_by_package_names_or_die($urpm, ['basesystem'], 1); my $rpmsrate_flags_was_chosen = $o->{rpmsrate_flags_chosen}; @@ -793,6 +794,19 @@ sub rpmsrate_always_flags { $rpmsrate_flags_chosen; } +sub default_bootloader() { + my $p; + # we only support grub2-efi on UEFI: + if (is_uefi()) { + log::l("selecting grub2-efi because it's needed for UEFI boot"); + $p = 'grub2-efi'; + } else { + log::l("defaulting to grub"); + $p = 'grub2-efi'; + } + [ $p ]; +} + =item default_packages($o) Selects default packages to install according to configuration (FS, HW, ...) @@ -831,8 +845,6 @@ sub default_packages { # only needed for CDs/DVDs installations: add_n_log("method='cdrom'", 'perl-Hal-Cdroms') if $o->{method} eq 'cdrom'; add_n_log("needed for VMware hypervisor", 'open-vm-tools') if detect_devices::is_vmware(); - # we only support grub2-efi on UEFI: - add_n_log("needed for UEFI boot", 'grub2-efi') if is_uefi(); my $dmi_BIOS = detect_devices::dmidecode_category('BIOS'); my $dmi_Base_Board = detect_devices::dmidecode_category('Base Board'); |