diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-20 18:46:02 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-20 18:46:02 +0000 |
commit | 22c29d8651668195f72e2f6a8e059d625eb511c3 (patch) | |
tree | dd1dd43f0ec47a9964c8a766eb8b3ad75cf51a64 /bitbake/lib/bb/shell.py | |
parent | 1bfd6edef9db9c9175058ae801d1b601e4f15263 (diff) | |
download | poky-22c29d8651668195f72e2f6a8e059d625eb511c3.tar.gz |
bitbake: Switch to bitbake-dev version (bitbake master upstream)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/shell.py')
-rw-r--r-- | bitbake/lib/bb/shell.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/bitbake/lib/bb/shell.py b/bitbake/lib/bb/shell.py index b1ad78306d..66e51719a4 100644 --- a/bitbake/lib/bb/shell.py +++ b/bitbake/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 | ||
@@ -208,6 +204,11 @@ class BitBakeShellCommands: | |||
208 | self.build( params, "configure" ) | 204 | self.build( params, "configure" ) |
209 | configure.usage = "<providee>" | 205 | configure.usage = "<providee>" |
210 | 206 | ||
207 | def install( self, params ): | ||
208 | """Execute 'install' on a providee""" | ||
209 | self.build( params, "install" ) | ||
210 | install.usage = "<providee>" | ||
211 | |||
211 | def edit( self, params ): | 212 | def edit( self, params ): |
212 | """Call $EDITOR on a providee""" | 213 | """Call $EDITOR on a providee""" |
213 | name = params[0] | 214 | name = params[0] |
@@ -240,18 +241,14 @@ class BitBakeShellCommands: | |||
240 | bf = completeFilePath( name ) | 241 | bf = completeFilePath( name ) |
241 | print "SHELL: Calling '%s' on '%s'" % ( cmd, bf ) | 242 | print "SHELL: Calling '%s' on '%s'" % ( cmd, bf ) |
242 | 243 | ||
243 | oldcmd = cooker.configuration.cmd | ||
244 | cooker.configuration.cmd = cmd | ||
245 | |||
246 | try: | 244 | try: |
247 | cooker.buildFile(bf) | 245 | cooker.buildFile(bf, cmd) |
248 | except parse.ParseError: | 246 | except parse.ParseError: |
249 | print "ERROR: Unable to open or parse '%s'" % bf | 247 | print "ERROR: Unable to open or parse '%s'" % bf |
250 | except build.EventException, e: | 248 | except build.EventException, e: |
251 | print "ERROR: Couldn't build '%s'" % name | 249 | print "ERROR: Couldn't build '%s'" % name |
252 | last_exception = e | 250 | last_exception = e |
253 | 251 | ||
254 | cooker.configuration.cmd = oldcmd | ||
255 | fileBuild.usage = "<bbfile>" | 252 | fileBuild.usage = "<bbfile>" |
256 | 253 | ||
257 | def fileClean( self, params ): | 254 | def fileClean( self, params ): |
@@ -493,7 +490,7 @@ SRC_URI = "" | |||
493 | interpreter.interact( "SHELL: Expert Mode - BitBake Python %s\nType 'help' for more information, press CTRL-D to switch back to BBSHELL." % sys.version ) | 490 | interpreter.interact( "SHELL: Expert Mode - BitBake Python %s\nType 'help' for more information, press CTRL-D to switch back to BBSHELL." % sys.version ) |
494 | 491 | ||
495 | def showdata( self, params ): | 492 | def showdata( self, params ): |
496 | """Show the parsed metadata for a given providee""" | 493 | """Execute 'showdata' on a providee""" |
497 | cooker.showEnvironment(None, params) | 494 | cooker.showEnvironment(None, params) |
498 | showdata.usage = "<providee>" | 495 | showdata.usage = "<providee>" |
499 | 496 | ||