cookerdata: Simplify prefiles/postfiles
PATCH 1/1 cookerdata: Simplify prefiles/postfiles
The current codepaths are rather confusing. Stop passing these as parameters and use the ones from when the object is created.
Signed-off-by Richard Purdie <[email protected]>
bitbake/lib/bb/cookerdata.py +5 -3
@@ -258,7 +258,7 @@ class CookerDataBuilder(object): def parseBaseConfiguration(self): try: - self.parseConfigurationFiles(self.prefiles, self.postfiles) + self.parseConfigurationFiles() except SyntaxError: raise bb.BBHandledException except bb.data_smart.ExpansionError as e:
@@ -271,8 +271,10 @@ class CookerDataBuilder(object): def _findLayerConf(self, data): return findConfigFile("bblayers.conf", data) - def parseConfigurationFiles(self, prefiles, postfiles): + def parseConfigurationFiles(self): data = self.data + prefiles = self.prefiles + postfiles = self.postfiles bb.parse.init_parser(data) # Parse files for loading *before* bitbake.conf and any includes
@@ -343,7 +345,7 @@ class CookerDataBuilder(object): if data.getVar("BB_INVALIDCONF", False) is True: data.setVar("BB_INVALIDCONF", False) - self.parseConfigurationFiles(self.prefiles, self.postfiles) + self.parseConfigurationFiles() return bb.parse.init_parser(data)
Quoted 5 lines · Richard Purdie
The current codepaths are rather confusing. Stop passing these as parameters and use the ones from when the object is created.
Signed-off-by Richard Purdie <[email protected]>
Looks good.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics