aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2015-07-14 18:29:49 -0500
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:52 +1200
commite81daf2e0fbcd38fae1a7ad1b629c97fdae25f31 (patch)
treef6be3bff4510a065eff95f0948ef563fd5e7e7b5
parentb2e04c0a9e118287c3c781036a82cb35b739cf35 (diff)
downloadopenembedded-core-contrib-e81daf2e0fbcd38fae1a7ad1b629c97fdae25f31.tar.gz
rrs/tools: get_recipe_pv_without_srcrev add support for discard prefixes
Avoid version prefixes like v|r into all versions. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-rw-r--r--rrs/tools/common.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/rrs/tools/common.py b/rrs/tools/common.py
index 01c47855c2..32fce45e70 100644
--- a/rrs/tools/common.py
+++ b/rrs/tools/common.py
@@ -144,12 +144,18 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
sfx = ''
if uri_type == 'git':
- git_regex = re.compile("(?P<pfx>(v|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)")
+ git_regex = re.compile("(?P<pfx>(v|r|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)")
m = git_regex.match(pv)
if m:
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)