diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-08-11 10:44:13 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-08-11 10:44:13 +0100 |
commit | 35896e59866acf39532b41f493697174ddeee265 (patch) | |
tree | 922c406141d31c5ac5294ed4d0df5ec7105f8ef8 /perl-install/bootloader.pm | |
parent | 3fc29c63961d1086340f218a16a4409c436d9091 (diff) | |
download | drakx-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/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 4 |
1 files changed, 3 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, |