mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
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>
This commit is contained in:
parent
b2e04c0a9e
commit
e81daf2e0f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user