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

Submitter:  Jan Kundrát <jkt>
Submitted:  Thu 22 Aug 2013 04:50:36 PM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  other
Release:  Reproducibility:  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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by jkt (Submitted the item)
  • -email is unavailable- added by jkt
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-22 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
    2013-08-22 jkt Attached File- Added grub2-version-sort.patch, #28910
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code