summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-08-11 10:44:13 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-08-11 10:44:13 +0100
commit35896e59866acf39532b41f493697174ddeee265 (patch)
tree922c406141d31c5ac5294ed4d0df5ec7105f8ef8 /perl-install
parent3fc29c63961d1086340f218a16a4409c436d9091 (diff)
downloaddrakx-35896e59866acf39532b41f493697174ddeee265.tar
drakx-35896e59866acf39532b41f493697174ddeee265.tar.gz
drakx-35896e59866acf39532b41f493697174ddeee265.tar.bz2
drakx-35896e59866acf39532b41f493697174ddeee265.tar.xz
drakx-35896e59866acf39532b41f493697174ddeee265.zip
bootloader: don't completely remove failsafe/nonfb entries on upgrade.
bootloader::suggest() removes any failsafe and nonfb entries for old kernels on the assumption it will then add them for a newer kernel. This is particularly a problem when using rEFInd, where we only keep the entries for the default (unversioned) kernel, but would also eliminate the failsafe/nonfb entries when using the installer upgrade option to quickly repair the bootloader.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm4
-rw-r--r--perl-install/install/NEWS2
2 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index b3156ddff..44376db2b 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1369,7 +1369,9 @@ sub suggest {
@kernels = grep { !$old_kernels{$_->{version}} } @kernels;
#- remove existing failsafe and linux-nonfb, do not care if the previous one was modified by the user?
- @{$bootloader->{entries}} = grep { !member($_->{label}, qw(failsafe linux-nonfb)) } @{$bootloader->{entries}};
+ #- but only if we are going to add new ones.
+ @{$bootloader->{entries}} = grep { !member($_->{label}, qw(failsafe linux-nonfb)) } @{$bootloader->{entries}}
+ if @kernels;
foreach my $kernel (@kernels) {
my $e = add_kernel($bootloader, $kernel,
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 838b77d3e..a3c2fb22b 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- bootloader: don't remove existing failsafe/nonfb entries on upgrade
+ if we aren't replacing them with new ones
- bootloader: add options to change the rEFInd background (mga#28073)
- Update the list of drivers that need a nonfree firmware against kernel-5.18