[OE-core] [PATCH 25/26] distrodata.bbclass: do not use get_recipe_pv_without_srcpv() before comparing versions in checkpkg

Alexander Kanavin alexander.kanavin at linux.intel.com
Fri Jul 31 15:09:47 UTC 2015


On 07/31/2015 05:54 PM, Aníbal Limón wrote:
> I added get_recipe_pv_without_srcpv for compare git versions because
> vercmp_string
> don't take into account git versioning (git, gitAUTOINC) causing wrong
> comparisons.
>
> We need to review if removal don't affect the current upstream detection.

These are the regex strings that get_recipe_pv_without_srcpv() is using:

for git sources:
git_regex = 
re.compile("(?P<pfx>(v|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)")

for everything else:
regex = re.compile("(?P<pfx>(v|r|))(?P<ver>((\d+[\.\-_]*)+))")

Both regular expressions are too restrictive in allowing only numeric 
characters in the <ver> component. If you try to match, say 3.1rc1 and 
3.1rc2, they will be both stripped of the '.rcN part, <ver> will be set 
to 3, and vercmp_string will of course say they match!

Alex



More information about the Openembedded-core mailing list