]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv
authorAníbal Limón <anibal.limon@linux.intel.com>
Wed, 15 Jul 2015 00:43:57 +0000 (19:43 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jul 2015 07:16:15 +0000 (08:16 +0100)
Some recipes uses v or r prefixes in versions that makes wrong
comparisions over recipes like lz4 r123 > 128.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/recipeutils.py

index 83923e9961cf4bb10e1d2d0db83cc3a2f032b0f9..9d45b4216e020566fd060271ca1f3b41cb7f698f 100644 (file)
@@ -645,6 +645,12 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
             pv = m.group('ver')
             pfx = m.group('pfx')
             sfx = m.group('sfx')
+    else:
+        regex = re.compile("(?P<pfx>(v|r|))(?P<ver>((\d+[\.\-_]*)+))")
+        m = regex.match(pv)
+        if m:
+            pv = m.group('ver')
+            pfx = m.group('pfx')
 
     return (pv, pfx, sfx)