The "most current" kernel detection is off. It has to do with the sorting, but I'm not quite sure how to fix it 100% (thus no email with a patch ;-) ).
Changing the simple sort
at the end of line # 495, in include/tests_kernel
, to this:
...will get you to the hyphenated part of the version number. Adding something like:
....borks the whole thing, so I'm not quite sure where to go from there. It's almost as if there needs to be a subfunction that sorts the hyphenated mini-version, then re-concatenates it to the rest of the version string. But it needs to take into consideration, the rest of the version string and prioritize that over the hyphenated mini-version.
So, after all of the piped sed
's let's use this as our list of kernel versions:
3.13.0-35
3.2.0-57
3.13.1-11
3.13.1-9
Using the first sort string (sort -t\. -k2n -k3n
) gets you to here:
3.2.0-57
3.13.0-35
3.13.1-11
3.13.1-9
...but we want version 3.13.1-11 to be at the bottom, since that is our "most current" version.
Using sort -t\. -k2n -k3n
is OK, but it's only a 90% solution, as they say. So I'm going to continue poking at other areas, as I find them, but I thought I would document this, as is.....for posterity, or whatever. ;-)
BTW, I played around with awk
'ing the hyphen (-) to a period (.) (could also be done with sed
), but that didn't get me anywhere.
Also, as an after thought...
| sed 's/[.-]//g' | sort -n
...gets us there, but with some sacrifices. 3.13.1[.-]9 is now at the top of the list, rather than 2nd to last, as it should be.