[oe-commits] [openembedded-core] 23/42: devtool: stop always moving workspace to end of BBLAYERS

git at git.openembedded.org git at git.openembedded.org
Fri Nov 10 12:32:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2a3c5543fc873a43271cf4e9e008f5b3b27247ac
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Fri Oct 13 16:49:34 2017 +1300

    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 at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/devtool | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/devtool b/scripts/devtool
index 87bb5c8..a651d8f 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list