summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/shell.py')
-rw-r--r--bitbake/lib/bb/shell.py33
1 files changed, 31 insertions, 2 deletions
diff --git a/bitbake/lib/bb/shell.py b/bitbake/lib/bb/shell.py
index 97e61e1169..b86dc9753c 100644
--- a/bitbake/lib/bb/shell.py
+++ b/bitbake/lib/bb/shell.py
@@ -18,6 +18,12 @@
18# Place, Suite 330, Boston, MA 02111-1307 USA. 18# Place, Suite 330, Boston, MA 02111-1307 USA.
19# 19#
20########################################################################## 20##########################################################################
21#
22# Thanks to:
23# * Holger Freyther <zecke@handhelds.org>
24# * Justin Patrin <papercrane@reversefold.com>
25#
26##########################################################################
21 27
22""" 28"""
23BitBake Shell 29BitBake Shell
@@ -53,7 +59,7 @@ import sys, os, imp, readline, socket, httplib, urllib, commands, popen2, copy,
53imp.load_source( "bitbake", os.path.dirname( sys.argv[0] )+"/bitbake" ) 59imp.load_source( "bitbake", os.path.dirname( sys.argv[0] )+"/bitbake" )
54from bb import data, parse, build, fatal 60from bb import data, parse, build, fatal
55 61
56__version__ = "0.5.2" 62__version__ = "0.5.3"
57__credits__ = """BitBake Shell Version %s (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> 63__credits__ = """BitBake Shell Version %s (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
58Type 'help' for more information, press CTRL-D to exit.""" % __version__ 64Type 'help' for more information, press CTRL-D to exit.""" % __version__
59 65
@@ -151,7 +157,7 @@ class BitBakeShellCommands:
151 157
152 for name in names: 158 for name in names:
153 try: 159 try:
154 cooker.buildProvider( name ) 160 cooker.buildProvider( name, data.getVar("BUILD_ALL_DEPS", cooker.configuration.data, True) )
155 except build.EventException, e: 161 except build.EventException, e:
156 print "ERROR: Couldn't build '%s'" % name 162 print "ERROR: Couldn't build '%s'" % name
157 global last_exception 163 global last_exception
@@ -252,6 +258,19 @@ class BitBakeShellCommands:
252 self.fileBuild( params ) 258 self.fileBuild( params )
253 fileRebuild.usage = "<bbfile>" 259 fileRebuild.usage = "<bbfile>"
254 260
261 def fileReparse( self, params ):
262 """(re)Parse a bb file"""
263 bbfile = params[0]
264 print "SHELL: Parsing '%s'" % bbfile
265 parse.update_mtime( bbfile )
266 bb_data, fromCache = cooker.load_bbfile( bbfile )
267 cooker.pkgdata[bbfile] = bb_data
268 if fromCache:
269 print "SHELL: File has not been updated, not reparsing"
270 else:
271 print "SHELL: Parsed"
272 fileReparse.usage = "<bbfile>"
273
255 def force( self, params ): 274 def force( self, params ):
256 """Toggle force task execution flag (see bitbake -f)""" 275 """Toggle force task execution flag (see bitbake -f)"""
257 cooker.configuration.force = not cooker.configuration.force 276 cooker.configuration.force = not cooker.configuration.force
@@ -391,6 +410,16 @@ SRC_URI = ""
391 parsed = True 410 parsed = True
392 print 411 print
393 412
413 def reparse( self, params ):
414 """(re)Parse a providee's bb file"""
415 bbfile = self._findProvider( params[0] )
416 if bbfile is not None:
417 print "SHELL: Found bbfile '%s' for '%s'" % ( bbfile, params[0] )
418 self.fileReparse( [ bbfile ] )
419 else:
420 print "ERROR: Nothing provides '%s'" % params[0]
421 reparse.usage = "<providee>"
422
394 def getvar( self, params ): 423 def getvar( self, params ):
395 """Dump the contents of an outer BitBake environment variable""" 424 """Dump the contents of an outer BitBake environment variable"""
396 var = params[0] 425 var = params[0]