summaryrefslogtreecommitdiffstats
path: root/scripts/devtool
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-07 00:15:53 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 15:41:46 +0000
commit532f42985f9dfb600b6a501436bddff746388640 (patch)
treecb91e31c20c86296c586de8737d86efc14207ee1 /scripts/devtool
parentec9016821d5c2a120dcb7e5d4b8cde02c2b45b51 (diff)
downloadpoky-532f42985f9dfb600b6a501436bddff746388640.tar.gz
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>
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-xscripts/devtool12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/devtool b/scripts/devtool
index bda05e1c2f..2d57da0bc1 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -112,8 +112,18 @@ def read_workspace():
112 res = externalsrc_re.match(line.rstrip()) 112 res = externalsrc_re.match(line.rstrip())
113 if res: 113 if res:
114 pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0] 114 pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
115 # Find the recipe file within the workspace, if any
116 bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
117 recipefile = glob.glob(os.path.join(config.workspace_path,
118 'recipes',
119 pn,
120 bbfile))
121 if recipefile:
122 recipefile = recipefile[0]
115 workspace[pn] = {'srctree': res.group(3), 123 workspace[pn] = {'srctree': res.group(3),
116 'bbappend': fn} 124 'bbappend': fn,
125 'recipefile': recipefile}
126 logger.debug('Found recipe %s' % workspace[pn])
117 127
118def create_workspace(args, config, basepath, workspace): 128def create_workspace(args, config, basepath, workspace):
119 if args.layerpath: 129 if args.layerpath: