bitbake: lib/bb/runqueue.py: fix exceptions with -k and failed targets

If a target dependency is marked as failed and yet we are continuing on
because -k has been specified, don't try to access the dependency's data
in taskData.build_targets since it will have been removed. This fixes
"IndexError: list index out of range" errors in this situation.

Also, do not print the "unhandled exception" message when SystemExit is
raised since we will have reported the actual error already in this
case (e.g. when -k has been specified and some targets failed).

Fixes [YOCTO #3133].

(Bitbake rev: 70eebc184eb1ab3678be87bed019b5beadecdc89)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2012-09-23 14:14:24 +01:00 committed by Richard Purdie
parent 1c2634c8d2
commit 0bdde689f6
1 changed files with 3 additions and 1 deletions

View File

@ -466,7 +466,7 @@ class RunQueueData:
# (makes sure sometask runs after targetname's someothertask)
idepends = taskData.tasks_idepends[task]
for (depid, idependtask) in idepends:
if depid in taskData.build_targets:
if depid in taskData.build_targets and not depid in taskData.failed_deps:
# Won't be in build_targets if ASSUME_PROVIDED
depdata = taskData.build_targets[depid][0]
if depdata is not None:
@ -932,6 +932,8 @@ class RunQueue:
return self._execute_runqueue()
except bb.runqueue.TaskFailure:
raise
except SystemExit:
raise
except:
logger.error("An uncaught exception occured in runqueue, please see the failure below:")
self.state = runQueueComplete