diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2015-07-14 18:29:49 -0500 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-05-04 23:57:52 +1200 |
commit | e81daf2e0fbcd38fae1a7ad1b629c97fdae25f31 (patch) | |
tree | f6be3bff4510a065eff95f0948ef563fd5e7e7b5 | |
parent | b2e04c0a9e118287c3c781036a82cb35b739cf35 (diff) | |
download | openembedded-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.py | 8 |
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) |