grubby-bls: use ~debug instead of -debug as suffix to sort correctly

For the debug BLS entries a -debug suffix was added so they are sorted after
the kernel entries, but that only works with version sort and not rpm sort.

So instead use ~debug prefix so rpm sort algorithm could sort it correctly.

Related: rhbz#1638103

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-10-19 20:51:29 +02:00
parent db3ffac800
commit 1c345197a4
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
1 changed files with 2 additions and 3 deletions

View File

@ -317,13 +317,12 @@ add_bls_fragment() {
fi
if [[ $MAKEDEBUG = "yes" ]]; then
arch="$(uname -m)"
bls_debug="$(echo ${bls_target} | sed -e "s/\.${arch}/-debug.${arch}/")"
bls_debug="$(echo ${bls_target} | sed -e "s/${kernelver}/${kernelver}~debug/")"
cp -aT "${bls_target}" "${bls_debug}"
append_bls_value "${bls_debug}" "title" "${LINUX_DEBUG_TITLE_POSTFIX}"
append_bls_value "${bls_debug}" "version" "${LINUX_DEBUG_VERSION_POSTFIX}"
append_bls_value "${bls_debug}" "options" "${CMDLINE_LINUX_DEBUG}"
blsid="$(get_bls_value ${bls_debug} "id" | sed -e "s/\.${arch}/-debug.${arch}/")"
blsid="$(get_bls_value ${bls_debug} "id" | sed -e "s/${kernelver}/${kernelver}~debug/")"
set_bls_value "${bls_debug}" "id" "${blsid}"
fi