diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-20 19:02:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 17:21:47 +0000 |
commit | 84b3a5ac3509109abd7550ee8becd3daa8ded0df (patch) | |
tree | d1fb0e34443d13ac48fd270dfd752caff98dc28f | |
parent | 7bab6ffc45494aea9b5c6264a153b3f9b6290301 (diff) | |
download | poky-84b3a5ac3509109abd7550ee8becd3daa8ded0df.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: 1469828fa747da0aaaa3e964954ff17f2b3180fa)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index b07c266439..98f56ac7be 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
@@ -288,7 +288,7 @@ class CookerDataBuilder(object): | |||
288 | 288 | ||
289 | multiconfig = (self.data.getVar("BBMULTICONFIG", True) or "").split() | 289 | multiconfig = (self.data.getVar("BBMULTICONFIG", True) or "").split() |
290 | for config in multiconfig: | 290 | for config in multiconfig: |
291 | mcdata = self.parseConfigurationFiles(['conf/multiconfig/%s.conf' % config] + self.prefiles, self.postfiles) | 291 | mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) |
292 | bb.event.fire(bb.event.ConfigParsed(), mcdata) | 292 | bb.event.fire(bb.event.ConfigParsed(), mcdata) |
293 | self.mcdata[config] = mcdata | 293 | self.mcdata[config] = mcdata |
294 | 294 | ||
@@ -304,8 +304,9 @@ class CookerDataBuilder(object): | |||
304 | def _findLayerConf(self, data): | 304 | def _findLayerConf(self, data): |
305 | return findConfigFile("bblayers.conf", data) | 305 | return findConfigFile("bblayers.conf", data) |
306 | 306 | ||
307 | def parseConfigurationFiles(self, prefiles, postfiles): | 307 | def parseConfigurationFiles(self, prefiles, postfiles, mc = "default"): |
308 | data = bb.data.createCopy(self.basedata) | 308 | data = bb.data.createCopy(self.basedata) |
309 | data.setVar("BB_CURRENT_MC", mc) | ||
309 | 310 | ||
310 | # Parse files for loading *before* bitbake.conf and any includes | 311 | # Parse files for loading *before* bitbake.conf and any includes |
311 | for f in prefiles: | 312 | for f in prefiles: |