summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-15 14:20:50 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-16 15:19:33 +0100
commit07a03a1290fd206df2b40ffc28381b5b3c10ba4a (patch)
tree0477624f7db23475fecc66b5188386b0bb3d09e6
parentec1c951a4ee0c33acdde29e578f79ad719a34aca (diff)
downloadbitbake-contrib-07a03a1290fd206df2b40ffc28381b5b3c10ba4a.tar.gz
cookerdata: allow multiple passes of config re-parsing
[YOCTO #10188] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cookerdata.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 07425ce00..9e88f9571 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -270,9 +270,16 @@ class CookerDataBuilder(object):
bb.event.fire(bb.event.ConfigParsed(), self.data)
- if self.data.getVar("BB_INVALIDCONF", False) is True:
+ reparse_cnt = 0
+ while self.data.getVar("BB_INVALIDCONF", False) is True:
+ if reparse_cnt > 20:
+ logger.error("Configuration has been re-parsed over 20 times, "
+ "breaking out of the loop...")
+ raise Exception("Too deep config re-parse loop. Check locations where "
+ "BB_INVALIDCONF is being set (ConfigParsed event handlers)")
self.data.setVar("BB_INVALIDCONF", False)
self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
+ reparse_cnt += 1
bb.event.fire(bb.event.ConfigParsed(), self.data)
bb.parse.init_parser(self.data)