summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-20 22:54:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-22 12:10:13 +0100
commitf242f5060bbc62815b6d5a245c1a9bf18f23675f (patch)
tree61aa4d66293ea4a4ea703e10499b13209affbbb1 /bitbake/lib/bb/cooker.py
parent308ae9210067da0348f2cf2b6d56a7dce5b45936 (diff)
downloadpoky-f242f5060bbc62815b6d5a245c1a9bf18f23675f.tar.gz
bitbake: bitbake: Create cookerdata splitting config from cooker and bin/bitbake
Currently the UI and server configuration is one big incestuous mess. To start to untangle this we creater cookerdata, a new module which contains various confiuration modules and the code for building the base datastore. To start with we add a ConfigParameters() class which contains information about both the commandline configuration and the original environment. The CookerConfiguration class is created to contain the cooker.configuration options. This means we can transfer new paramters to the server over something like XMLRPC and then build a new configuration from these on the server. Based on a patch from Alexandru Damian <alexandru.damian@intel.com> (Bitbake rev: 35bd5997e8d8e74bc36019030cc10c560a8134f9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index affe1136c4..1a2c01639e 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -87,12 +87,10 @@ class BBCooker:
87 Manages one bitbake build run 87 Manages one bitbake build run
88 """ 88 """
89 89
90 def __init__(self, configuration, server_registration_cb, savedenv={}): 90 def __init__(self, configuration):
91 self.recipecache = None 91 self.recipecache = None
92 self.skiplist = {} 92 self.skiplist = {}
93 93
94 self.server_registration_cb = server_registration_cb
95
96 self.configuration = configuration 94 self.configuration = configuration
97 95
98 # Keep a datastore of the initial environment variables and their 96 # Keep a datastore of the initial environment variables and their
@@ -100,6 +98,7 @@ class BBCooker:
100 # to use environment variables which have been cleaned from the 98 # to use environment variables which have been cleaned from the
101 # BitBake processes env 99 # BitBake processes env
102 self.savedenv = bb.data.init() 100 self.savedenv = bb.data.init()
101 savedenv = configuration.params.environment
103 for k in savedenv: 102 for k in savedenv:
104 self.savedenv.setVar(k, savedenv[k]) 103 self.savedenv.setVar(k, savedenv[k])
105 104
@@ -179,7 +178,7 @@ class BBCooker:
179 if self.configuration.show_environment: 178 if self.configuration.show_environment:
180 self.configuration.data.enableTracking() 179 self.configuration.data.enableTracking()
181 180
182 if not self.server_registration_cb: 181 if not self.configuration.server_register_idlecallback:
183 self.configuration.data.setVar("BB_WORKERCONTEXT", "1") 182 self.configuration.data.setVar("BB_WORKERCONTEXT", "1")
184 183
185 filtered_keys = bb.utils.approved_variables() 184 filtered_keys = bb.utils.approved_variables()
@@ -1188,7 +1187,7 @@ class BBCooker:
1188 return True 1187 return True
1189 return retval 1188 return retval
1190 1189
1191 self.server_registration_cb(buildFileIdle, rq) 1190 self.configuration.server_register_idlecallback(buildFileIdle, rq)
1192 1191
1193 def buildTargets(self, targets, task): 1192 def buildTargets(self, targets, task):
1194 """ 1193 """
@@ -1246,7 +1245,7 @@ class BBCooker:
1246 if universe: 1245 if universe:
1247 rq.rqdata.warn_multi_bb = True 1246 rq.rqdata.warn_multi_bb = True
1248 1247
1249 self.server_registration_cb(buildTargetsIdle, rq) 1248 self.configuration.server_register_idlecallback(buildTargetsIdle, rq)
1250 1249
1251 def generateNewImage(self, image, base_image, package_queue): 1250 def generateNewImage(self, image, base_image, package_queue):
1252 ''' 1251 '''