bugGNU GRUB - Bugs: bug #39855, grub2-mkconfig: wrong sort order...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #39855: grub2-mkconfig: wrong sort order for Linux kernels with ditro-specific prefixes

Submitted by:  Jan Kundrát <jkt>
Submitted on:  Thu 22 Aug 2013 04:50:36 PM UTC  
 
Category: ConfigurationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: otherReproducibility: Every Time
Planned Release: None

Thu 22 Aug 2013 04:58:52 PM UTC, comment #1:

Eh, as per http://lists.gnu.org/archive/html/grub-devel/2012-03/msg00183.html, this is already resolved/fixed upstream. Sorry for noise :(, please close this item.

Jan Kundrát <jkt>
Thu 22 Aug 2013 04:50:36 PM UTC, original submission:

This is my /boot:

/boot/8cuj15uc.iso
/boot/System.map-genkernel-x86_64-3.10.9
/boot/System.map-genkernel-x86_64-3.9.6
/boot/grub2
/boot/initramfs-genkernel-x86_64-3.10.9
/boot/initramfs-genkernel-x86_64-3.9.6
/boot/kernel-genkernel-x86_64-3.10.9
/boot/kernel-genkernel-x86_64-3.9.6

grib2-mkconfig insisten on preferring the 3.9.6 kernel over the 3.10.9 version. Here is why -- the grub-mkconfig_lib contains a "
version_test_numeric" function which attempts to use numeric sort for version comparisons. Unfortunately, the rest of the code passes the file names including the "genkernel-x86_64-" prefix, and `sort -n` falls back to regular string sort. However, using `sort -V` for "version" sort works, see the attached patch.

Jan Kundrát <jkt>

 

Attached Files
file #28910:  grub2-version-sort.patch added by jkt (381B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Updated the item)
  • -unavailable- added by jkt (Submitted the item)
  • -unavailable- added by jkt
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Aug 2013 06:32:49 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 22 Aug 2013 04:50:36 PM UTCjktAttached File-=>Added grub2-version-sort.patch, #28910
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1