mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
command.py: add initCooker API
initCooker is to set the cooker to the initial state with nothing parsed. (Bitbake rev: 8ee9c6cc47938604268242d90bd3007218f9a36e) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7d7d3a0009
commit
cf13bfe661
@@ -157,6 +157,12 @@ class CommandsSync:
|
|||||||
value = params[1]
|
value = params[1]
|
||||||
command.cooker.configuration.data.setVar(varname, value)
|
command.cooker.configuration.data.setVar(varname, value)
|
||||||
|
|
||||||
|
def initCooker(self, command, params):
|
||||||
|
"""
|
||||||
|
Init the cooker to initial state with nothing parsed
|
||||||
|
"""
|
||||||
|
command.cooker.initialize()
|
||||||
|
|
||||||
def resetCooker(self, command, params):
|
def resetCooker(self, command, params):
|
||||||
"""
|
"""
|
||||||
Reset the cooker to its initial state, thus forcing a reparse for
|
Reset the cooker to its initial state, thus forcing a reparse for
|
||||||
|
|||||||
@@ -167,6 +167,15 @@ class BBCooker:
|
|||||||
|
|
||||||
self.parser = None
|
self.parser = None
|
||||||
|
|
||||||
|
def initConfigurationData(self):
|
||||||
|
self.configuration.data = bb.data.init()
|
||||||
|
|
||||||
|
if not self.server_registration_cb:
|
||||||
|
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
||||||
|
|
||||||
|
filtered_keys = bb.utils.approved_variables()
|
||||||
|
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
||||||
|
|
||||||
def loadConfigurationData(self):
|
def loadConfigurationData(self):
|
||||||
self.configuration.data = bb.data.init()
|
self.configuration.data = bb.data.init()
|
||||||
|
|
||||||
@@ -1304,6 +1313,10 @@ class BBCooker:
|
|||||||
def reparseFiles(self):
|
def reparseFiles(self):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def initialize(self):
|
||||||
|
self.state = state.initial
|
||||||
|
self.initConfigurationData()
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
self.state = state.initial
|
self.state = state.initial
|
||||||
self.loadConfigurationData()
|
self.loadConfigurationData()
|
||||||
|
|||||||
Reference in New Issue
Block a user