aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-10-13 16:49:34 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-11-09 14:47:44 +1300
commit6ee2341dd2d80a35f15478104e792fe5165bd1fb (patch)
tree408eb9b131fc90161e2cde54a2f326446da1ad65
parent5c234ce6c9effc0ae98c26e55bb01648e33248d1 (diff)
downloadopenembedded-core-contrib-6ee2341dd2d80a35f15478104e792fe5165bd1fb.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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-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):
if not os.path.exists(bblayers_conf):
logger.error('Unable to find bblayers.conf')
return
- _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, config.workspace_path)
+ if os.path.abspath(workspacedir) != os.path.abspath(config.workspace_path):
+ removedir = config.workspace_path
+ else:
+ removedir = None
+ _, added = bb.utils.edit_bblayers_conf(bblayers_conf, workspacedir, removedir)
if added:
logger.info('Enabling workspace layer in bblayers.conf')
if config.workspace_path != workspacedir: