diff options
Diffstat (limited to 'bitbake/lib/bb/shell.py')
-rw-r--r-- | bitbake/lib/bb/shell.py | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/bitbake/lib/bb/shell.py b/bitbake/lib/bb/shell.py index 32a773064b..fc213c3f4a 100644 --- a/bitbake/lib/bb/shell.py +++ b/bitbake/lib/bb/shell.py @@ -104,10 +104,11 @@ class BitBakeShellCommands: def _findProvider( self, item ): self._checkParsed() + # Need to use taskData for this information preferred = data.getVar( "PREFERRED_PROVIDER_%s" % item, cooker.configuration.data, 1 ) if not preferred: preferred = item try: - lv, lf, pv, pf = Providers.findBestProvider(preferred, cooker.configuration.data, cooker.status, cooker.build_cache_fail) + lv, lf, pv, pf = Providers.findBestProvider(preferred, cooker.configuration.data, cooker.status) except KeyError: if item in cooker.status.providers: pf = cooker.status.providers[item][0] @@ -144,6 +145,7 @@ class BitBakeShellCommands: def build( self, params, cmd = "build" ): """Build a providee""" + global last_exception globexpr = params[0] self._checkParsed() names = globfilter( cooker.status.pkg_pn.keys(), globexpr ) @@ -152,8 +154,6 @@ class BitBakeShellCommands: oldcmd = cooker.configuration.cmd cooker.configuration.cmd = cmd - cooker.build_cache = [] - cooker.build_cache_fail = [] td = taskdata.TaskData(cooker.configuration.abort) @@ -170,24 +170,21 @@ class BitBakeShellCommands: td.add_unresolved(cooker.configuration.data, cooker.status) - rq = runqueue.RunQueue() - rq.prepare_runqueue(cooker, cooker.configuration.data, cooker.status, td, tasks) - rq.execute_runqueue(cooker, cooker.configuration.data, cooker.status, td, tasks) + rq = runqueue.RunQueue(cooker, cooker.configuration.data, cooker.status, td, tasks) + rq.prepare_runqueue() + rq.execute_runqueue() except Providers.NoProvider: print "ERROR: No Provider" - global last_exception last_exception = Providers.NoProvider except runqueue.TaskFailure, fnids: for fnid in fnids: print "ERROR: '%s' failed" % td.fn_index[fnid] - global last_exception last_exception = runqueue.TaskFailure except build.EventException, e: print "ERROR: Couldn't build '%s'" % names - global last_exception last_exception = e cooker.configuration.cmd = oldcmd @@ -236,14 +233,13 @@ class BitBakeShellCommands: def fileBuild( self, params, cmd = "build" ): """Parse and build a .bb file""" + global last_exception name = params[0] bf = completeFilePath( name ) print "SHELL: Calling '%s' on '%s'" % ( cmd, bf ) oldcmd = cooker.configuration.cmd cooker.configuration.cmd = cmd - cooker.build_cache = [] - cooker.build_cache_fail = [] thisdata = copy.deepcopy( initdata ) # Caution: parse.handle modifies thisdata, hence it would @@ -266,7 +262,6 @@ class BitBakeShellCommands: cooker.tryBuildPackage( os.path.abspath( bf ), item, cmd, bbfile_data, True ) except build.EventException, e: print "ERROR: Couldn't build '%s'" % name - global last_exception last_exception = e cooker.configuration.cmd = oldcmd @@ -537,8 +532,6 @@ SRC_URI = "" def status( self, params ): """<just for testing>""" print "-" * 78 - print "build cache = '%s'" % cooker.build_cache - print "build cache fail = '%s'" % cooker.build_cache_fail print "building list = '%s'" % cooker.building_list print "build path = '%s'" % cooker.build_path print "consider_msgs_cache = '%s'" % cooker.consider_msgs_cache @@ -557,6 +550,7 @@ SRC_URI = "" def which( self, params ): """Computes the providers for a given providee""" + # Need to use taskData for this information item = params[0] self._checkParsed() @@ -565,8 +559,7 @@ SRC_URI = "" if not preferred: preferred = item try: - lv, lf, pv, pf = Providers.findBestProvider(preferred, cooker.configuration.data, cooker.status, -cooker.build_cache_fail) + lv, lf, pv, pf = Providers.findBestProvider(preferred, cooker.configuration.data, cooker.status) except KeyError: lv, lf, pv, pf = (None,)*4 |