Follow-up Comment #1, bug #42597 (project grub):

wrong sort in version_test_numeric().

I installed different kernels under arch linux. A grub-mkconfig ordered the
menu entries oddly.
As arch is not using versioning numbers in the kernel image's filenames, it
should sort alphabetically.

Example
/boot/vmlinuz-linux-lts
/boot/vmlinuz-hardened
/boot/vmlinuz-zen

the lts entry somehow always was sorted out as "newest". But it should be
following order hardened, lts, zen.

I found a typo in grub-mkconfig_lib.in line 233:
if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") |
version_sort | head -n 1 | grep -qx "$version_test_numeric_b" ; then

It should be
....... | grep -qx "$version_test_numeric_a" ; then

After that fix the ordering is correct in my case.



(file #43128)
    _______________________________________________________

Additional Item Attachment:

File name: grub.patch                     Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42597>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to