db7cf3a089
Add some fixes for BLS parsing logic and also make 20-grub.install script to query the relative path of the kernel and initramfs images, so BLS can also work when /boot is not a mount point or is a btrfs subvolume. Also pull some build fixes. Resolves: rhbz#1588184 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
From 689a48c76bee8049a50f962852f43f108c815450 Mon Sep 17 00:00:00 2001
|
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
Date: Fri, 27 Apr 2018 17:53:41 +0200
|
|
Subject: [PATCH 237/243] Use BLS version field to compare entries if id field
|
|
isn't defined
|
|
|
|
The BootLoaderSpec fragments generated by OSTree don't have the id field,
|
|
so grub2 will attempt to sort the entries by using the title field which
|
|
may not be correct. The entries do have a version field though so use it.
|
|
|
|
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
---
|
|
grub-core/commands/blscfg.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
|
|
index 1e5972422d6..72ee497ea2d 100644
|
|
--- a/grub-core/commands/blscfg.c
|
|
+++ b/grub-core/commands/blscfg.c
|
|
@@ -418,6 +418,9 @@ static int bls_cmp(const void *p0, const void *p1, void *state UNUSED)
|
|
|
|
rc = bls_keyval_cmp (e0, e1, "id");
|
|
|
|
+ if (rc == 0)
|
|
+ rc = bls_keyval_cmp (e0, e1, "version");
|
|
+
|
|
if (rc == 0)
|
|
rc = bls_keyval_cmp (e0, e1, "title");
|
|
|
|
--
|
|
2.17.1
|
|
|