summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-20 19:02:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-22 12:36:40 +0000
commitdbb247cac5fbf7b037e4955f9793828451723924 (patch)
tree89ea94b1e4e532b92cf75a90b4d617d3ee628820 /bitbake
parent4fc02c5eaaf7ef70606d06f8c7664ce7e40d166b (diff)
downloadpoky-dbb247cac5fbf7b037e4955f9793828451723924.tar.gz
bitbake: cookerdata: Convert multiconfig to use BB_CURRENT_MC
People are struggling with multiconfig as the point the conf file is injected into the data store is not what people expect. We can't really use a post config since that is too late and we can't really use a pre config file since that is too early. In OE terms, we need something right around the local.conf point so it behaves in a similar way. A way to handle this is to set the new variable BB_CURRENT_MC to be the currently selected multiconfig, then the metadata itself can choose when to inject the approriate configuration. (Bitbake rev: 518b9015c2be8d3894277a8e54890d6f04d656c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cookerdata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index c6e958b43c..d9eab562cf 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -289,7 +289,7 @@ class CookerDataBuilder(object):
289 289
290 multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() 290 multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split()
291 for config in multiconfig: 291 for config in multiconfig:
292 mcdata = self.parseConfigurationFiles(['conf/multiconfig/%s.conf' % config] + self.prefiles, self.postfiles) 292 mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config)
293 bb.event.fire(bb.event.ConfigParsed(), mcdata) 293 bb.event.fire(bb.event.ConfigParsed(), mcdata)
294 self.mcdata[config] = mcdata 294 self.mcdata[config] = mcdata
295 295
@@ -305,8 +305,9 @@ class CookerDataBuilder(object):
305 def _findLayerConf(self, data): 305 def _findLayerConf(self, data):
306 return findConfigFile("bblayers.conf", data) 306 return findConfigFile("bblayers.conf", data)
307 307
308 def parseConfigurationFiles(self, prefiles, postfiles): 308 def parseConfigurationFiles(self, prefiles, postfiles, mc = "default"):
309 data = bb.data.createCopy(self.basedata) 309 data = bb.data.createCopy(self.basedata)
310 data.setVar("BB_CURRENT_MC", mc)
310 311
311 # Parse files for loading *before* bitbake.conf and any includes 312 # Parse files for loading *before* bitbake.conf and any includes
312 for f in prefiles: 313 for f in prefiles: