bitbake: cookerdata: allow multiple passes of config re-parsing

[YOCTO #10188]

(Bitbake rev: 07a03a1290fd206df2b40ffc28381b5b3c10ba4a)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Markus Lehtonen 2016-09-15 14:20:50 +03:00 committed by Richard Purdie
parent e3e239ba54
commit 088d386ddb
1 changed files with 8 additions and 1 deletions

View File

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