From 01f9d1b338d561213b5136bb3bd087e56eafbab7 Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Thu, 20 Jun 2013 13:19:42 +0300 Subject: bitbake: bitbake & hob: modify some commands and call them from hob This patch adds a new command to create an extra configuration file, in order to create it from Hob. Also, it calls the enable/disable data tracking when needed. Modified the prefiles and postfiles variables because the cooker expects some lists. (Bitbake rev: 92393701adcfa181a1090e3632bc6df7ee7852e6) Signed-off-by: Cristiana Voicu Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 16 +++++++++++++--- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 5f696c2aee..9dc38ec938 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -217,11 +217,21 @@ class CommandsSync: return command.cooker.generateNewImage(image, base_image, package_queue) def setVarFile(self, command, params): + """ + Save a variable in a file; used for saving in a configuration file + """ var = params[0] val = params[1] default_file = params[2] command.cooker.saveConfigurationVar(var, val, default_file) + def createConfigFile(self, command, params): + """ + Create an extra configuration file + """ + name = params[0] + command.cooker.createConfigFile(name) + class CommandsAsync: """ A class of asynchronous commands @@ -390,11 +400,11 @@ class CommandsAsync: """ Parse the configuration files """ - prefiles = params[0] - postfiles = params[1] + prefiles = params[0].split() + postfiles = params[1].split() command.cooker.configuration.prefile = prefiles command.cooker.configuration.postfile = postfiles - command.cooker.loadConfigurationData() + command.cooker.loadConfigurationData(tracking=True) command.finishAsyncCommand() parseConfigurationFiles.needcache = False diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index d060bc0b42..8fd989b6c9 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -454,7 +454,9 @@ class HobHandler(gobject.GObject): return " ".join(ret) def set_var_in_file(self, var, val, default_file=None): + self.runCommand(["enableDataTracking"]) self.server.runCommand(["setVarFile", var, val, default_file]) + self.runCommand(["disableDataTracking"]) def get_parameters(self): # retrieve the parameters from bitbake -- cgit v1.2.3-54-g00ecf