dotcloud/docker — pull request #3695 by chazomaticus (2014-01-21 04:31:43+00:00)
Title: ignore non-numeric characters when parsing kernel version

This fixes parsing unconventional kernel versions by just grabbing the digits from the version string. #3628 is the immediate bug fixed here, but this should also make the version parsing more robust from future bugs similar to the already-fixed #455 and #1643.

In this patch, I just removed the Flavor string from KernelVersionInfo, as it didn't seem to be used anywhere, and if it was supposed to be informative, it didn't seem to contain useful info in many cases (e.g. 1.2.3+-flavor or 1.2.3flavor). Parsing the version string now just grabs the first 3 digit groupings, ignoring anything non-numeric that comes after it. If it's desirable to keep the Flavor around, it wouldn't be too hard to re-add it, but it would seem that we need to define how it should look given all the different separators (or lack thereof) possible in kernel version strings in the wild.

Also I snuck in a typo fix. :)