[oe-commits] =?UTF-8?Q?An=C3=ADbal=20Lim=C3=B3n=20?=: recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv

git at git.openembedded.org git at git.openembedded.org
Wed Jul 22 07:24:55 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: f7d250c97f40a737df9020180852d2ee87ca06b3
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f7d250c97f40a737df9020180852d2ee87ca06b3

Author: Aníbal Limón <anibal.limon at linux.intel.com>
Date:   Tue Jul 14 19:43:57 2015 -0500

recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv

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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oe/recipeutils.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 83923e9..9d45b42 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -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)
 



More information about the Openembedded-commits mailing list