mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 21:24:46 +02:00
layerindex/recipeparse.py: extend bbclass regex
Extend the bbclass regex to match classes-global and classes-recipe [YOCTO #15238] Signed-off-by: Tim Orling <tim.orling@konsulko.com>
This commit is contained in:
parent
c2a8e07020
commit
b71fff2121
|
@ -130,7 +130,7 @@ def setup_layer(config_data, fetchdir, layerdir, layer, layerbranch, logger):
|
||||||
|
|
||||||
machine_conf_re = re.compile(r'conf/machine/([^/.]*).conf$')
|
machine_conf_re = re.compile(r'conf/machine/([^/.]*).conf$')
|
||||||
distro_conf_re = re.compile(r'conf/distro/([^/.]*).conf$')
|
distro_conf_re = re.compile(r'conf/distro/([^/.]*).conf$')
|
||||||
bbclass_re = re.compile(r'classes/([^/.]*).bbclass$')
|
bbclass_re = re.compile(r'classes(?P<subtype>-global|-recipe)?/(?P<name>[^/.]*).bbclass$')
|
||||||
def detect_file_type(path, subdir_start):
|
def detect_file_type(path, subdir_start):
|
||||||
typename = None
|
typename = None
|
||||||
if fnmatch.fnmatch(path, "*.bb"):
|
if fnmatch.fnmatch(path, "*.bb"):
|
||||||
|
@ -149,7 +149,7 @@ def detect_file_type(path, subdir_start):
|
||||||
res = bbclass_re.match(subpath)
|
res = bbclass_re.match(subpath)
|
||||||
if res:
|
if res:
|
||||||
typename = 'bbclass'
|
typename = 'bbclass'
|
||||||
return (typename, None, res.group(1))
|
return (typename, None, res.group('name'))
|
||||||
res = distro_conf_re.match(subpath)
|
res = distro_conf_re.match(subpath)
|
||||||
if res:
|
if res:
|
||||||
typename = 'distro'
|
typename = 'distro'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user