summaryrefslogtreecommitdiffstats
path: root/bitbake-dev
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2008-10-24 17:37:46 +0100
committerRob Bradford <rob@linux.intel.com>2008-10-27 10:19:55 +0000
commitf5c494bba5be9204f440c87771001300ccde900a (patch)
tree992b83e43626867a31a264635e1fa74640cbc61a /bitbake-dev
parent790ed683565e56ef513bad568de1b15d801bfe7b (diff)
downloadpoky-f5c494bba5be9204f440c87771001300ccde900a.tar.gz
bitbake-dev: Remove use of self.configuration.cmd as state from shell
The shell updated the self.configuration.cmd variable since commans relied on this implicit state. Since those commands now have an explicit task parameter such state manipulation is no longer necessary.
Diffstat (limited to 'bitbake-dev')
-rw-r--r--bitbake-dev/lib/bb/shell.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/bitbake-dev/lib/bb/shell.py b/bitbake-dev/lib/bb/shell.py
index 34828fe425..55bae25d44 100644
--- a/bitbake-dev/lib/bb/shell.py
+++ b/bitbake-dev/lib/bb/shell.py
@@ -151,9 +151,6 @@ class BitBakeShellCommands:
151 if len( names ) == 0: names = [ globexpr ] 151 if len( names ) == 0: names = [ globexpr ]
152 print "SHELL: Building %s" % ' '.join( names ) 152 print "SHELL: Building %s" % ' '.join( names )
153 153
154 oldcmd = cooker.configuration.cmd
155 cooker.configuration.cmd = cmd
156
157 td = taskdata.TaskData(cooker.configuration.abort) 154 td = taskdata.TaskData(cooker.configuration.abort)
158 localdata = data.createCopy(cooker.configuration.data) 155 localdata = data.createCopy(cooker.configuration.data)
159 data.update_data(localdata) 156 data.update_data(localdata)
@@ -168,7 +165,7 @@ class BitBakeShellCommands:
168 if len(providers) == 0: 165 if len(providers) == 0:
169 raise Providers.NoProvider 166 raise Providers.NoProvider
170 167
171 tasks.append([name, "do_%s" % cooker.configuration.cmd]) 168 tasks.append([name, "do_%s" % cmd])
172 169
173 td.add_unresolved(localdata, cooker.status) 170 td.add_unresolved(localdata, cooker.status)
174 171
@@ -189,7 +186,6 @@ class BitBakeShellCommands:
189 print "ERROR: Couldn't build '%s'" % names 186 print "ERROR: Couldn't build '%s'" % names
190 last_exception = e 187 last_exception = e
191 188
192 cooker.configuration.cmd = oldcmd
193 189
194 build.usage = "<providee>" 190 build.usage = "<providee>"
195 191
@@ -240,18 +236,14 @@ class BitBakeShellCommands:
240 bf = completeFilePath( name ) 236 bf = completeFilePath( name )
241 print "SHELL: Calling '%s' on '%s'" % ( cmd, bf ) 237 print "SHELL: Calling '%s' on '%s'" % ( cmd, bf )
242 238
243 oldcmd = cooker.configuration.cmd
244 cooker.configuration.cmd = cmd
245
246 try: 239 try:
247 cooker.buildFile(bf) 240 cooker.buildFile(bf, cmd)
248 except parse.ParseError: 241 except parse.ParseError:
249 print "ERROR: Unable to open or parse '%s'" % bf 242 print "ERROR: Unable to open or parse '%s'" % bf
250 except build.EventException, e: 243 except build.EventException, e:
251 print "ERROR: Couldn't build '%s'" % name 244 print "ERROR: Couldn't build '%s'" % name
252 last_exception = e 245 last_exception = e
253 246
254 cooker.configuration.cmd = oldcmd
255 fileBuild.usage = "<bbfile>" 247 fileBuild.usage = "<bbfile>"
256 248
257 def fileClean( self, params ): 249 def fileClean( self, params ):