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