diff --git a/rrs/tools/common.py b/rrs/tools/common.py index 01c4785..32fce45 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(v|))(?P((\d+[\.\-_]*)+))(?P(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P.*)") + git_regex = re.compile("(?P(v|r|))(?P((\d+[\.\-_]*)+))(?P(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P.*)") m = git_regex.match(pv) if m: 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)