diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-09-23 14:14:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-24 12:13:51 +0100 |
commit | 0bdde689f651a22a2ff925bcdd88755cde592b3d (patch) | |
tree | 294ece1da1ad6fe3977bf962b7b80ac6d43399a2 | |
parent | 1c2634c8d236a0eb1abc2fdc3ee5950ac7a2b345 (diff) | |
download | poky-0bdde689f651a22a2ff925bcdd88755cde592b3d.tar.gz |
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>
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index bc2eb8772e..b90b7e7e4a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -466,7 +466,7 @@ class RunQueueData: | |||
466 | # (makes sure sometask runs after targetname's someothertask) | 466 | # (makes sure sometask runs after targetname's someothertask) |
467 | idepends = taskData.tasks_idepends[task] | 467 | idepends = taskData.tasks_idepends[task] |
468 | for (depid, idependtask) in idepends: | 468 | for (depid, idependtask) in idepends: |
469 | if depid in taskData.build_targets: | 469 | if depid in taskData.build_targets and not depid in taskData.failed_deps: |
470 | # Won't be in build_targets if ASSUME_PROVIDED | 470 | # Won't be in build_targets if ASSUME_PROVIDED |
471 | depdata = taskData.build_targets[depid][0] | 471 | depdata = taskData.build_targets[depid][0] |
472 | if depdata is not None: | 472 | if depdata is not None: |
@@ -932,6 +932,8 @@ class RunQueue: | |||
932 | return self._execute_runqueue() | 932 | return self._execute_runqueue() |
933 | except bb.runqueue.TaskFailure: | 933 | except bb.runqueue.TaskFailure: |
934 | raise | 934 | raise |
935 | except SystemExit: | ||
936 | raise | ||
935 | except: | 937 | except: |
936 | logger.error("An uncaught exception occured in runqueue, please see the failure below:") | 938 | logger.error("An uncaught exception occured in runqueue, please see the failure below:") |
937 | self.state = runQueueComplete | 939 | self.state = runQueueComplete |