summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 12:26:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-07 16:56:26 +0100
commit3e9456322d1c7a932697f5cf81bf4a4989b21f54 (patch)
treedb663ce14df3ba6cd5e4d6acc935c388a3d73364 /bitbake/lib/bb/command.py
parent2b2b3e8c342107b4cbb51e3a81103047ee9b63d9 (diff)
downloadpoky-3e9456322d1c7a932697f5cf81bf4a4989b21f54.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r--bitbake/lib/bb/command.py18
1 files changed, 9 insertions, 9 deletions
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:
116 116
117 def finishAsyncCommand(self, msg=None, code=None): 117 def finishAsyncCommand(self, msg=None, code=None):
118 if msg: 118 if msg:
119 bb.event.fire(CommandFailed(msg), self.cooker.configuration.event_data) 119 bb.event.fire(CommandFailed(msg), self.cooker.event_data)
120 elif code: 120 elif code:
121 bb.event.fire(CommandExit(code), self.cooker.configuration.event_data) 121 bb.event.fire(CommandExit(code), self.cooker.event_data)
122 else: 122 else:
123 bb.event.fire(CommandCompleted(), self.cooker.configuration.event_data) 123 bb.event.fire(CommandCompleted(), self.cooker.event_data)
124 self.currentAsyncCommand = None 124 self.currentAsyncCommand = None
125 125
126 126
@@ -145,22 +145,22 @@ class CommandsSync:
145 145
146 def getVariable(self, command, params): 146 def getVariable(self, command, params):
147 """ 147 """
148 Read the value of a variable from configuration.data 148 Read the value of a variable from data
149 """ 149 """
150 varname = params[0] 150 varname = params[0]
151 expand = True 151 expand = True
152 if len(params) > 1: 152 if len(params) > 1:
153 expand = params[1] 153 expand = params[1]
154 154
155 return command.cooker.configuration.data.getVar(varname, expand) 155 return command.cooker.data.getVar(varname, expand)
156 156
157 def setVariable(self, command, params): 157 def setVariable(self, command, params):
158 """ 158 """
159 Set the value of variable in configuration.data 159 Set the value of variable in data
160 """ 160 """
161 varname = params[0] 161 varname = params[0]
162 value = str(params[1]) 162 value = str(params[1])
163 command.cooker.configuration.data.setVar(varname, value) 163 command.cooker.data.setVar(varname, value)
164 164
165 def setConfig(self, command, params): 165 def setConfig(self, command, params):
166 """ 166 """
@@ -375,7 +375,7 @@ class CommandsAsync:
375 """ 375 """
376 Parse the .bb files 376 Parse the .bb files
377 """ 377 """
378 if bb.fetch.fetcher_compare_revisions(command.cooker.configuration.data): 378 if bb.fetch.fetcher_compare_revisions(command.cooker.data):
379 command.finishAsyncCommand(code=1) 379 command.finishAsyncCommand(code=1)
380 else: 380 else:
381 command.finishAsyncCommand() 381 command.finishAsyncCommand()
@@ -398,7 +398,7 @@ class CommandsAsync:
398 Trigger a certain event 398 Trigger a certain event
399 """ 399 """
400 event = params[0] 400 event = params[0]
401 bb.event.fire(eval(event), command.cooker.configuration.data) 401 bb.event.fire(eval(event), command.cooker.data)
402 command.currentAsyncCommand = None 402 command.currentAsyncCommand = None
403 triggerEvent.needcache = False 403 triggerEvent.needcache = False
404 404