mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
devtool: refactor code for getting local recipe file
We're doing this in a couple of places, let's just find the recipe file if it exists within the workspace (which it will if it's been added through "devtool add") when we read in the workspace. (From OE-Core rev: 81cf5580993c99050e3f4d6d891bc67534721487) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ec9016821d
commit
532f42985f
@@ -112,8 +112,18 @@ def read_workspace():
|
||||
res = externalsrc_re.match(line.rstrip())
|
||||
if res:
|
||||
pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
|
||||
# Find the recipe file within the workspace, if any
|
||||
bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
|
||||
recipefile = glob.glob(os.path.join(config.workspace_path,
|
||||
'recipes',
|
||||
pn,
|
||||
bbfile))
|
||||
if recipefile:
|
||||
recipefile = recipefile[0]
|
||||
workspace[pn] = {'srctree': res.group(3),
|
||||
'bbappend': fn}
|
||||
'bbappend': fn,
|
||||
'recipefile': recipefile}
|
||||
logger.debug('Found recipe %s' % workspace[pn])
|
||||
|
||||
def create_workspace(args, config, basepath, workspace):
|
||||
if args.layerpath:
|
||||
|
||||
Reference in New Issue
Block a user