[oe-commits] [openembedded-core] 02/06: devtool: finish: fix error if destination layer is not in bblayers.conf

git at git.openembedded.org git at git.openembedded.org
Mon Nov 7 11:05:41 UTC 2016


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

commit c6980307d43632f4172e79d9607004203af4e9c8
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Mon Oct 31 16:59:45 2016 +1300

    devtool: finish: fix error if destination layer is not in bblayers.conf
    
    If devtool finish is run on a recipe where the recipe file itself is in
    the workspace (e.g. where devtool add / devtool upgrade has been used)
    and the specified destination layer is not in bblayers.conf, then we
    need to avoid running bitbake -c clean at the end because the recipe has
    been moved, but the bbappend is still present in the workspace layer at
    that point and so if we do it will fail due to the dangling bbappend.
    It's difficult to do the clean at the point we'd want to because tinfoil
    is holding bitbake.lock for most of the time, but in any case cleaning
    the recipe is less important than it used to be since we started
    managing the sysroot contents more strictly, so just disable cleaning
    under these circumstances to avoid the problem.
    
    Fixes [YOCTO #10484].
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/lib/devtool/standard.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 8dfd538..9511d56 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1479,6 +1479,7 @@ def finish(args, config, basepath, workspace):
 
     check_workspace_recipe(workspace, args.recipename)
 
+    no_clean = False
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
         rd = parse_recipe(config, tinfoil, args.recipename, True)
@@ -1540,6 +1541,7 @@ def finish(args, config, basepath, workspace):
         if origlayerdir == config.workspace_path and destpath:
             # Recipe file itself is in the workspace - need to move it and any
             # associated files to the specified layer
+            no_clean = True
             logger.info('Moving recipe file to %s' % destpath)
             recipedir = os.path.dirname(rd.getVar('FILE', True))
             for root, _, files in os.walk(recipedir):
@@ -1554,7 +1556,7 @@ def finish(args, config, basepath, workspace):
         tinfoil.shutdown()
 
     # Everything else has succeeded, we can now reset
-    _reset([args.recipename], no_clean=False, config=config, basepath=basepath, workspace=workspace)
+    _reset([args.recipename], no_clean=no_clean, config=config, basepath=basepath, workspace=workspace)
 
     return 0
 

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


More information about the Openembedded-commits mailing list