Skip to content

Commit 9d562ef

Browse files
Update boot entry sorting for GrubCC
One difference between GrubCC and SystemdBoot right now is that GrubCC doesn't use the `sort-key` from BLS config file to sort boot entries but sorts them exactly like Grub would See #2221 Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
1 parent 6501722 commit 9d562ef

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

crates/lib/src/bootc_composefs/status.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,9 @@ fn get_sorted_type1_boot_entries_helper(
329329
let ord = match bootloader {
330330
// For systemd-boot sort by sort-key
331331
Bootloader::Systemd => a.config.cmp(&b.config),
332-
// For grub, sort by filename in descending order
333-
Bootloader::Grub => b.filename.cmp(&a.filename),
332+
// For grub and grub-cc, sort by filename in descending order
333+
// See: https://github.com/bootc-dev/bootc/issues/2221
334+
Bootloader::Grub | Bootloader::GrubCC => b.filename.cmp(&a.filename),
334335
Bootloader::None => {
335336
unreachable!("Bootloader checked during installation should not have been none")
336337
}

0 commit comments

Comments
 (0)