[bitbake-devel] [PATCH] bitbake: runqueue: Catch IndexError Python exception when resolving task dependencies

Andrey Zhizhikin andrey.z at gmail.com
Thu Aug 31 16:23:32 UTC 2017


This exception usually occurs when a task has a dependency,
which is listed in ASSUME_PROVIDED and should be resolved
quite early.

Case where this can be reproduced is when pseudo-native is listed
in ASSUME_PROVIDED, which then fails to be resolved by various
recipes.

This patch gives a valuable information to the user on which task
Bitbake excepts, so the user can investigate it's config files.

Signed-off-by: Andrey Zhizhikin <andrey.z at gmail.com>
---
 lib/bb/runqueue.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index e1a15af..fc3b27a 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2129,7 +2129,11 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
                     if depname not in self.rqdata.taskData[mc].build_targets:
                         continue

-                    depfn = self.rqdata.taskData[mc].build_targets[depname][0]
+                    try:
+                        depfn =
self.rqdata.taskData[mc].build_targets[depname][0]
+                    except IndexError:
+                        bb.msg.fatal("RunQueue", "Task %s failed with
index %s" % (realtid, depname))
+
                     if depfn is None:
                          continue
                     deptid = depfn + ":" + idependtask.replace("_setscene", "")
-- 
2.7.4



More information about the bitbake-devel mailing list