From 3e9456322d1c7a932697f5cf81bf4a4989b21f54 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 30 May 2013 12:26:58 +0000 Subject: bitbake: cooker: Split data from configuration The reasons for combining these objects is ancient history, it makes sense to clean things up and separate them out now. This follows on logically from the configuration cleansups and leads well into the bitbake-worker changes. (Bitbake rev: 89ffd62661ebcf2a97ce0c8dfd5e4d5bfbe27de7) Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bitbake/lib/bb/command.py') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index cc6a981921..ab6950111f 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -116,11 +116,11 @@ class Command: def finishAsyncCommand(self, msg=None, code=None): if msg: - bb.event.fire(CommandFailed(msg), self.cooker.configuration.event_data) + bb.event.fire(CommandFailed(msg), self.cooker.event_data) elif code: - bb.event.fire(CommandExit(code), self.cooker.configuration.event_data) + bb.event.fire(CommandExit(code), self.cooker.event_data) else: - bb.event.fire(CommandCompleted(), self.cooker.configuration.event_data) + bb.event.fire(CommandCompleted(), self.cooker.event_data) self.currentAsyncCommand = None @@ -145,22 +145,22 @@ class CommandsSync: def getVariable(self, command, params): """ - Read the value of a variable from configuration.data + Read the value of a variable from data """ varname = params[0] expand = True if len(params) > 1: expand = params[1] - return command.cooker.configuration.data.getVar(varname, expand) + return command.cooker.data.getVar(varname, expand) def setVariable(self, command, params): """ - Set the value of variable in configuration.data + Set the value of variable in data """ varname = params[0] value = str(params[1]) - command.cooker.configuration.data.setVar(varname, value) + command.cooker.data.setVar(varname, value) def setConfig(self, command, params): """ @@ -375,7 +375,7 @@ class CommandsAsync: """ Parse the .bb files """ - if bb.fetch.fetcher_compare_revisions(command.cooker.configuration.data): + if bb.fetch.fetcher_compare_revisions(command.cooker.data): command.finishAsyncCommand(code=1) else: command.finishAsyncCommand() @@ -398,7 +398,7 @@ class CommandsAsync: Trigger a certain event """ event = params[0] - bb.event.fire(eval(event), command.cooker.configuration.data) + bb.event.fire(eval(event), command.cooker.data) command.currentAsyncCommand = None triggerEvent.needcache = False -- cgit v1.2.3-54-g00ecf