Blame SOURCES/0243-grub-switch-to-blscfg-use-debug-instead-of-debug-as-.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Javier Martinez Canillas <javierm@redhat.com>
8631a2
Date: Fri, 19 Oct 2018 18:48:27 +0200
8631a2
Subject: [PATCH] grub-switch-to-blscfg: use ~debug instead of -debug as suffix
8631a2
 to sort correctly
8631a2
8631a2
For the debug BLS entries a -debug suffix was added so they are sorted after
8631a2
the kernel entries, but that only works with version sort and not rpm sort.
8631a2
8631a2
So instead use ~debug prefix so rpm sort algorithm could sort it correctly.
8631a2
8631a2
Related: rhbz#1638103
8631a2
8631a2
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
8631a2
---
8631a2
 util/grub-switch-to-blscfg.in | 2 +-
8631a2
 1 file changed, 1 insertion(+), 1 deletion(-)
8631a2
8631a2
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
8631a2
index 1c6bd1882a7..60cd6ca63cc 100644
8631a2
--- a/util/grub-switch-to-blscfg.in
8631a2
+++ b/util/grub-switch-to-blscfg.in
8631a2
@@ -250,7 +250,7 @@ for kernelver in $(cd /lib/modules/ ; ls -1) "" ; do
8631a2
     fi
8631a2
 
8631a2
     if [ "x$GRUB_LINUX_MAKE_DEBUG" = "xtrue" ]; then
8631a2
-        bls_debug="$(echo ${bls_target} | sed -e "s/\.${arch}/-debug.${arch}/")"
8631a2
+        bls_debug="$(echo ${bls_target} | sed -e "s/${kernelver}/${kernelver}~debug/")"
8631a2
         cp -aT  "${bls_target}" "${bls_debug}"
8631a2
         title="$(grep '^title[ \t]' "${bls_debug}" | sed -e 's/^title[ \t]*//')"
8631a2
         blsid="$(grep '^id[ \t]' "${bls_debug}" | sed -e "s/\.${ARCH}/-debug.${arch}/")"