summaryrefslogtreecommitdiffstats
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-21 16:55:43 +0000
commit518b9015c2be8d3894277a8e54890d6f04d656c0 (patch)
tree6dc7f8c9f74a691b48e02d49606e599ba0a62741
parentab15486c636e451ed5a62e561980946887901c3b (diff)
downloadbitbake-contrib-518b9015c2be8d3894277a8e54890d6f04d656c0.tar.gz
bitbake-contrib-518b9015c2be8d3894277a8e54890d6f04d656c0.tar.bz2
bitbake-contrib-518b9015c2be8d3894277a8e54890d6f04d656c0.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cookerdata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index c6e958b43c..d9eab562cf 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -289,7 +289,7 @@ class CookerDataBuilder(object):
multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split()
for config in multiconfig:
- mcdata = self.parseConfigurationFiles(['conf/multiconfig/%s.conf' % config] + self.prefiles, self.postfiles)
+ mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config)
bb.event.fire(bb.event.ConfigParsed(), mcdata)
self.mcdata[config] = mcdata
@@ -305,8 +305,9 @@ class CookerDataBuilder(object):
def _findLayerConf(self, data):
return findConfigFile("bblayers.conf", data)
- def parseConfigurationFiles(self, prefiles, postfiles):
+ def parseConfigurationFiles(self, prefiles, postfiles, mc = "default"):
data = bb.data.createCopy(self.basedata)
+ data.setVar("BB_CURRENT_MC", mc)
# Parse files for loading *before* bitbake.conf and any includes
for f in prefiles: