diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-06-20 17:21:15 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-20 16:26:22 +0100 |
commit | 71520c50452cbc5094d8236a405e7ef76114d18d (patch) | |
tree | 0a49429f818eb94ebb9055c590e1127f6f8e7f89 /bitbake/lib | |
parent | d3027b3e9b8cd78e0f310206b34bfdd457f63d84 (diff) | |
download | ast2050-yocto-poky-71520c50452cbc5094d8236a405e7ef76114d18d.zip ast2050-yocto-poky-71520c50452cbc5094d8236a405e7ef76114d18d.tar.gz |
bitbake: bitbake: call the initConfiguration when reparsing
As it is implemented now, when parsing the configuration files is
needed, it also needs an initialization.
Also, implemented a function to create an extra configuration files
which can be used as postfile/prefiles when parsing.
(Bitbake rev: 5fe23c1b51da14f58f8c483f43f30b48766a0913)
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/command.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 43dd2f4..1727654 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -396,7 +396,7 @@ class CommandsAsync: postfiles = params[1].split() command.cooker.configuration.prefile = prefiles command.cooker.configuration.postfile = postfiles - command.cooker.loadConfigurationData(tracking=True) + command.cooker.loadConfigurationData() command.finishAsyncCommand() parseConfigurationFiles.needcache = False diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 9c9734f..2245f8e 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -109,7 +109,6 @@ class BBCooker: sys.exit("FATAL: Failed to import extra cache class '%s'." % cache_name) self.data = None - self.initConfigurationData() self.loadConfigurationData() # Take a lock so only one copy of bitbake can run against a given build @@ -158,6 +157,7 @@ class BBCooker: self.data.disableTracking() def loadConfigurationData(self): + self.initConfigurationData() self.databuilder.parseBaseConfiguration() self.data = self.databuilder.data self.data_hash = self.databuilder.data_hash @@ -245,6 +245,11 @@ class BBCooker: loginfo = {"op":set, "file":default_file, "line":total.count("\n")} self.data.setVar(var, val, **loginfo) + def createConfigFile(self, name): + path = os.getcwd() + confpath = os.path.join(path, "conf", name) + open(confpath, 'w').close() + def parseConfiguration(self): # Set log file verbosity @@ -1200,7 +1205,6 @@ class BBCooker: def reset(self): self.state = state.initial - self.initConfigurationData() self.loadConfigurationData() def server_main(cooker, func, *args): |