diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-08-17 11:10:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-19 18:05:39 +0100 |
commit | 677e8c8e97ec377c5919943a9ca7257787b6ab81 (patch) | |
tree | 1af3878ca71d1058e84a65bcd5dabfa5b9b18be9 /scripts/devtool | |
parent | 48bb9eca790c354eb6505b02ce940398a6efa8a1 (diff) | |
download | poky-677e8c8e97ec377c5919943a9ca7257787b6ab81.tar.gz |
devtool: fix handling of BBCLASSEXTENDed recipes
If a recipe is BBCLASSEXTENDed (e.g. to -native), its PN value and the
name of the bbappend will be different; we were assuming them to be the
same when reading in the workspace, leading to us seeing the base recipe
name everywhere afterwards.
Also add a test so we ensure this doesn't regress in future.
Fixes [YOCTO #8157].
(From OE-Core rev: b63fca00c2e24ad0c8b8b3c492d93ee4372fa92d)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-x | scripts/devtool | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/devtool b/scripts/devtool index 1c2243812a..b9d3bb9e85 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
@@ -104,15 +104,15 @@ def read_workspace(): | |||
104 | _enable_workspace_layer(config.workspace_path, config, basepath) | 104 | _enable_workspace_layer(config.workspace_path, config, basepath) |
105 | 105 | ||
106 | logger.debug('Reading workspace in %s' % config.workspace_path) | 106 | logger.debug('Reading workspace in %s' % config.workspace_path) |
107 | externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-[^ =]+)? =.*$') | 107 | externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-([^ =]+))? *= *"([^"]*)"$') |
108 | for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')): | 108 | for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')): |
109 | pn = os.path.splitext(os.path.basename(fn))[0].split('_')[0] | ||
110 | with open(fn, 'r') as f: | 109 | with open(fn, 'r') as f: |
111 | for line in f: | 110 | for line in f: |
112 | if externalsrc_re.match(line.rstrip()): | 111 | res = externalsrc_re.match(line.rstrip()) |
113 | splitval = line.split('=', 2) | 112 | if res: |
114 | workspace[pn] = splitval[1].strip('" \n\r\t') | 113 | pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0] |
115 | break | 114 | workspace[pn] = {'srctree': res.group(3), |
115 | 'bbappend': fn} | ||
116 | 116 | ||
117 | def create_workspace(args, config, basepath, workspace): | 117 | def create_workspace(args, config, basepath, workspace): |
118 | if args.layerpath: | 118 | if args.layerpath: |