[yocto] [PATCH] run-config: Reverse the oder of remove layers

Aaron Chan aaron.chun.yew.chan at intel.com
Wed Aug 8 03:12:47 PDT 2018


This patch fixes the "Collection Error during parsing layer conf"
when a parent layer is accidentally added before depend layers.
When removing layers from bblayers, we should not be following
the same sequence of adding the layers, it should be done in a
reversed order. This is an assumption that the layers have their
dependent layers added before the parent layers are added.
In general, the parent layer require to be remove first before
its child dependencies layers.

Signed-off-by: Aaron Chan <aaron.chun.yew.chan at intel.com>
---
 scripts/run-config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/run-config b/scripts/run-config
index ce40249..9fede1e 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -152,8 +152,8 @@ for stepnum in range(1, maxsteps + 1):
         utils.printheader("Step %s/%s: Running 'plain' command %s" % (stepnum, maxsteps, cmd))
         bitbakecmd(builddir, cmd, report, stepnum, oeenv=False)
 
-    # Remove any layers we added
-    for layer in layers:
+    # Remove any layers we added in a reverse order
+    for layer in reversed(layers):
         bitbakecmd(builddir, "bitbake-layers remove-layer %s" % layer, report, stepnum)
 
 if publish:
-- 
2.16.2.windows.1



More information about the yocto mailing list