From f7d250c97f40a737df9020180852d2ee87ca06b3 Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Tue, 14 Jul 2015 19:43:57 -0500 Subject: recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Richard Purdie --- meta/lib/oe/recipeutils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta/lib/oe/recipeutils.py') diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 83923e9961..9d45b4216e 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(v|r|))(?P((\d+[\.\-_]*)+))") + m = regex.match(pv) + if m: + pv = m.group('ver') + pfx = m.group('pfx') return (pv, pfx, sfx) -- cgit 1.2.3-korg