summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/command.py6
-rw-r--r--bitbake/lib/bb/cooker.py13
2 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 5dec6a9d09..701b286187 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -157,6 +157,12 @@ class CommandsSync:
157 value = params[1] 157 value = params[1]
158 command.cooker.configuration.data.setVar(varname, value) 158 command.cooker.configuration.data.setVar(varname, value)
159 159
160 def initCooker(self, command, params):
161 """
162 Init the cooker to initial state with nothing parsed
163 """
164 command.cooker.initialize()
165
160 def resetCooker(self, command, params): 166 def resetCooker(self, command, params):
161 """ 167 """
162 Reset the cooker to its initial state, thus forcing a reparse for 168 Reset the cooker to its initial state, thus forcing a reparse for
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 6473839b30..1faf821aa5 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -167,6 +167,15 @@ class BBCooker:
167 167
168 self.parser = None 168 self.parser = None
169 169
170 def initConfigurationData(self):
171 self.configuration.data = bb.data.init()
172
173 if not self.server_registration_cb:
174 bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
175
176 filtered_keys = bb.utils.approved_variables()
177 bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
178
170 def loadConfigurationData(self): 179 def loadConfigurationData(self):
171 self.configuration.data = bb.data.init() 180 self.configuration.data = bb.data.init()
172 181
@@ -1304,6 +1313,10 @@ class BBCooker:
1304 def reparseFiles(self): 1313 def reparseFiles(self):
1305 return 1314 return
1306 1315
1316 def initialize(self):
1317 self.state = state.initial
1318 self.initConfigurationData()
1319
1307 def reset(self): 1320 def reset(self):
1308 self.state = state.initial 1321 self.state = state.initial
1309 self.loadConfigurationData() 1322 self.loadConfigurationData()