All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] run-config: Reverse the oder of remove layers
@ 2018-08-08 10:12 Aaron Chan
  0 siblings, 0 replies; only message in thread
From: Aaron Chan @ 2018-08-08 10:12 UTC (permalink / raw)
  To: richard.purdie, yocto, aaron.chun.yew.chan

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@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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-08 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 10:12 [PATCH] run-config: Reverse the oder of remove layers Aaron Chan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.