summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-06-20 17:21:15 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-20 16:26:22 +0100
commit71520c50452cbc5094d8236a405e7ef76114d18d (patch)
tree0a49429f818eb94ebb9055c590e1127f6f8e7f89 /bitbake/lib/bb
parentd3027b3e9b8cd78e0f310206b34bfdd457f63d84 (diff)
downloadpoky-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/bb')
-rw-r--r--bitbake/lib/bb/command.py2
-rw-r--r--bitbake/lib/bb/cooker.py8
2 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 43dd2f4644..17276541cc 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -396,7 +396,7 @@ class CommandsAsync:
396 postfiles = params[1].split() 396 postfiles = params[1].split()
397 command.cooker.configuration.prefile = prefiles 397 command.cooker.configuration.prefile = prefiles
398 command.cooker.configuration.postfile = postfiles 398 command.cooker.configuration.postfile = postfiles
399 command.cooker.loadConfigurationData(tracking=True) 399 command.cooker.loadConfigurationData()
400 command.finishAsyncCommand() 400 command.finishAsyncCommand()
401 parseConfigurationFiles.needcache = False 401 parseConfigurationFiles.needcache = False
402 402
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 9c9734f887..2245f8ea34 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -109,7 +109,6 @@ class BBCooker:
109 sys.exit("FATAL: Failed to import extra cache class '%s'." % cache_name) 109 sys.exit("FATAL: Failed to import extra cache class '%s'." % cache_name)
110 110
111 self.data = None 111 self.data = None
112 self.initConfigurationData()
113 self.loadConfigurationData() 112 self.loadConfigurationData()
114 113
115 # Take a lock so only one copy of bitbake can run against a given build 114 # Take a lock so only one copy of bitbake can run against a given build
@@ -158,6 +157,7 @@ class BBCooker:
158 self.data.disableTracking() 157 self.data.disableTracking()
159 158
160 def loadConfigurationData(self): 159 def loadConfigurationData(self):
160 self.initConfigurationData()
161 self.databuilder.parseBaseConfiguration() 161 self.databuilder.parseBaseConfiguration()
162 self.data = self.databuilder.data 162 self.data = self.databuilder.data
163 self.data_hash = self.databuilder.data_hash 163 self.data_hash = self.databuilder.data_hash
@@ -245,6 +245,11 @@ class BBCooker:
245 loginfo = {"op":set, "file":default_file, "line":total.count("\n")} 245 loginfo = {"op":set, "file":default_file, "line":total.count("\n")}
246 self.data.setVar(var, val, **loginfo) 246 self.data.setVar(var, val, **loginfo)
247 247
248 def createConfigFile(self, name):
249 path = os.getcwd()
250 confpath = os.path.join(path, "conf", name)
251 open(confpath, 'w').close()
252
248 def parseConfiguration(self): 253 def parseConfiguration(self):
249 254
250 # Set log file verbosity 255 # Set log file verbosity
@@ -1200,7 +1205,6 @@ class BBCooker:
1200 1205
1201 def reset(self): 1206 def reset(self):
1202 self.state = state.initial 1207 self.state = state.initial
1203 self.initConfigurationData()
1204 self.loadConfigurationData() 1208 self.loadConfigurationData()
1205 1209
1206def server_main(cooker, func, *args): 1210def server_main(cooker, func, *args):