summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-10-13 16:49:34 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-11 12:14:27 +0000
commit4a523a4efea53b89aadef24570df2e13830a763b (patch)
tree31c1e5e4731fe21e48bdd3d6333ec8075865a8cc /scripts
parent941902d6bbf1c59871cbc81eec61b1bf456ad6ae (diff)
downloadpoky-4a523a4efea53b89aadef24570df2e13830a763b.tar.gz
devtool: stop always moving workspace to end of BBLAYERS
I noticed that using bitbake-layers add-layer followed by a devtool command resulted in bitbake re-parsing all of the recipes, which is annoying. Upon closer inspection I could see that devtool was moving the workspace layer path to the end of BBLAYERS if it happened to be somewhere in the middle - there's no need for it to be doing this. This occurred because we were passing the current workspace path to remove and the "new" path to add even if the path is not being changed, and I think earlier versions of bb.utils.edit_bblayers_conf() didn't move the existing entry under these circumstances as it clearly does now. Fix it so we only pass the path to be removed if we're actually changing the path. (From OE-Core rev: 284426dbad91a3c52eaf7da5c58fe8a2c2dfb826) 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')
-rwxr-xr-xscripts/devtool6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 87bb5c8323..a651d8f213 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -189,7 +189,11 @@ def _enable_workspace_layer(workspacedir, config, basepath):
189 if not os.path.exists(bblayers_conf): 189 if not os.path.exists(bblayers_conf):
190 logger.error('Unable to find bblayers.conf') 190 logger.error('Unable to find bblayers.conf')
191 return 191 return
192 _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path) 192 if os.path.abspath(workspacedir) != os.path.abspath(config.workspace_path):
193 removedir = config.workspace_path
194 else:
195 removedir = None
196 _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, removedir)
193 if added: 197 if added:
194 logger.info('Enabling workspace layer in bblayers.conf') 198 logger.info('Enabling workspace layer in bblayers.conf')
195 if config.workspace_path != workspacedir: 199 if config.workspace_path != workspacedir: