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

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