On 31/07/15 10:31, Aníbal Limón wrote:
On 31/07/15 10:09, Alexander Kanavin wrote:
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!
In this case we need to add rcN into the regex because if you cmp
something like,
>>> import bb
>>> bb.utils.vercmp_string('3.0+gitX', '2.9+gitX')
It returns 1 that means 2.9+gitX is greater than 3.0+gitX.
alimon
I made a mistake here the case that i say is when have a prefix like,
>>> import bb
>>> bb.utils.vercmp_string('r2.7+gitX', '2.9+gitX')
alimon
Alex
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core