Skip to content

Commit 44391bb

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 bb678b5 commit 44391bb

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
@@ -328,8 +328,9 @@ fn get_sorted_type1_boot_entries_helper(
328328
let ord = match bootloader {
329329
// For systemd-boot sort by sort-key
330330
Bootloader::Systemd => a.config.cmp(&b.config),
331-
// For grub, sort by filename in descending order
332-
Bootloader::Grub => b.filename.cmp(&a.filename),
331+
// For grub and grub-cc, sort by filename in descending order
332+
// See: https://github.com/bootc-dev/bootc/issues/2221
333+
Bootloader::Grub | Bootloader::GrubCC => b.filename.cmp(&a.filename),
333334
Bootloader::None => {
334335
unreachable!("Bootloader checked during installation should not have been none")
335336
}

0 commit comments

Comments
 (0)