"""
command.cooker.disableDataTracking()
- def initCooker(self, command, params):
- """
- Init the cooker to initial state with nothing parsed
- """
- command.cooker.initialize()
-
- def resetCooker(self, command, params):
- """
- Reset the cooker to its initial state, thus forcing a reparse for
- any async command that has the needcache property set to True
- """
- command.cooker.reset()
+ def setPrePostConfFiles(self, command, params):
+ prefiles = params[0].split()
+ postfiles = params[1].split()
+ command.cooker.configuration.prefile = prefiles
+ command.cooker.configuration.postfile = postfiles
def getCpuCount(self, command, params):
"""
command.finishAsyncCommand()
compareRevisions.needcache = True
- def parseConfigurationFiles(self, command, params):
- """
- Parse the configuration files
- """
- prefiles = params[0].split()
- postfiles = params[1].split()
- command.cooker.configuration.prefile = prefiles
- command.cooker.configuration.postfile = postfiles
- command.cooker.loadConfigurationData()
- command.finishAsyncCommand()
- parseConfigurationFiles.needcache = False
-
def triggerEvent(self, command, params):
"""
Trigger a certain event
command.currentAsyncCommand = None
triggerEvent.needcache = False
+ def resetCooker(self, command, params):
+ """
+ Reset the cooker to its initial state, thus forcing a reparse for
+ any async command that has the needcache property set to True
+ """
+ command.cooker.reset()
+ command.finishAsyncCommand()
+ resetCooker.needcache = False
+
self.configuration = configuration
- self.loadConfigurationData()
+ self.initConfigurationData()
# Take a lock so only one copy of bitbake can run against a given build
# directory at a time
def initConfigurationData(self):
self.state = state.initial
-
self.caches_array = []
+ if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
+ self.enableDataTracking()
+
all_extra_cache_names = []
# We hardcode all known cache types in a single place, here.
if CookerFeatures.HOB_EXTRA_CACHES in self.featureset:
self.databuilder = bb.cookerdata.CookerDataBuilder(self.configuration, False)
self.data = self.databuilder.data
- def enableDataTracking(self):
- self.configuration.tracking = True
- self.data.enableTracking()
-
- def disableDataTracking(self):
- self.configuration.tracking = False
- self.data.disableTracking()
-
- def loadConfigurationData(self):
- if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
- self.enableDataTracking()
-
- self.initConfigurationData()
self.databuilder.parseBaseConfiguration()
self.data = self.databuilder.data
self.data_hash = self.databuilder.data_hash
if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.disableDataTracking()
+ def enableDataTracking(self):
+ self.configuration.tracking = True
+ self.data.enableTracking()
+
+ def disableDataTracking(self):
+ self.configuration.tracking = False
+ self.data.disableTracking()
def modifyConfigurationVar(self, var, val, default_file, op):
if op == "append":
def finishcommand(self):
self.state = state.initial
- def initialize(self):
- self.initConfigurationData()
-
def reset(self):
- self.loadConfigurationData()
+ self.initConfigurationData()
def server_main(cooker, func, *args):
cooker.pre_serve()
self.set_user_config_proxies()
def set_user_config(self):
- self.handler.reset_cooker()
# set bb layers
self.handler.set_bblayers(self.configuration.layers)
# set local configuration
elif next_command == self.SUB_MATCH_CLASS:
self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
elif next_command == self.SUB_PARSE_CONFIG:
- self.runCommand(["enableDataTracking"])
- self.runCommand(["parseConfigurationFiles", "conf/.hob.conf", ""])
- self.runCommand(["disableDataTracking"])
+ self.runCommand(["resetCooker"])
elif next_command == self.SUB_GNERATE_TGTS:
self.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
elif next_command == self.SUB_GENERATE_PKGINFO:
reparse = self.runCommand(["getVariable", "BB_INVALIDCONF"]) or None
if reparse is True:
self.set_var_in_file("BB_INVALIDCONF", False, "local.conf")
- self.runCommand(["parseConfigurationFiles", "conf/.hob.conf", ""])
+ self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
+ self.commands_async.prepend(self.SUB_PARSE_CONFIG)
self.run_next_command()
elif isinstance(event, bb.event.SanityCheckFailed):
return
def init_cooker(self):
- self.runCommand(["initCooker"])
self.runCommand(["createConfigFile", ".hob.conf"])
- def reset_cooker(self):
- self.runCommand(["resetCooker"])
-
def set_extra_inherit(self, bbclass):
inherits = self.runCommand(["getVariable", "INHERIT"]) or ""
inherits = inherits + " " + bbclass
self.run_next_command(self.NETWORK_TEST)
def generate_configuration(self):
- self.commands_async.append(self.SUB_PARSE_CONFIG)
+ self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
self.commands_async.append(self.SUB_PATH_LAYERS)
self.commands_async.append(self.SUB_FILES_DISTRO)
self.commands_async.append(self.SUB_FILES_MACH)
self.commands_async.append(self.SUB_FILES_SDKMACH)
self.commands_async.append(self.SUB_MATCH_CLASS)
+ self.commands_async.append(self.SUB_PARSE_CONFIG)
self.run_next_command(self.GENERATE_CONFIGURATION)
def generate_recipes(self):
+ self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
self.commands_async.append(self.SUB_PARSE_CONFIG)
self.commands_async.append(self.SUB_GNERATE_TGTS)
self.run_next_command(self.GENERATE_RECIPES)
targets.extend(tgts)
self.recipe_queue = targets
self.default_task = default_task
+ self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
self.commands_async.append(self.SUB_PARSE_CONFIG)
self.commands_async.append(self.SUB_BUILD_RECIPES)
self.run_next_command(self.GENERATE_PACKAGES)
self.package_queue = image_packages
self.toolchain_packages = toolchain_packages
self.default_task = default_task
+ self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
self.commands_async.append(self.SUB_PARSE_CONFIG)
self.commands_async.append(self.SUB_BUILD_IMAGE)
self.run_next_command(self.GENERATE_IMAGE)