Patchwork [bitbake-devel] runqueue: Use taskData.fn_index[depdata] instead of uninitialized dep

login
register
mail settings
Submitter Martin Jansa
Date March 13, 2013, 8:01 p.m.
Message ID <1363204911-5012-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/46161/
State Accepted
Commit 58847fabd389e5b8d02d5a9c6827aabedb30312f
Headers show

Comments

Martin Jansa - March 13, 2013, 8:01 p.m.
* dep variable was removed in
  commit 3190cb83e2af195a464f669c5aa8aedbf795160e
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Wed Jun 27 11:04:06 2012 +0100

    taskdata: Add gettask_id_fromfnid helper function

    This is like gettask_id but doesn't require translation of fnid -> fn
    first which the function then translates back. This gives a sizeable
    performance improvement since a significant number of lookups are avoided.

* now it fails completely instead of showing which task is missing

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 lib/bb/runqueue.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 1bbe791..872bb78 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -472,7 +472,7 @@  class RunQueueData:
                         if depdata is not None:
                             taskid = taskData.gettask_id_fromfnid(depdata, idependtask)
                             if taskid is None:
-                                bb.msg.fatal("RunQueue", "Task %s in %s depends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep))
+                                bb.msg.fatal("RunQueue", "Task %s in %s depends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, taskData.fn_index[depdata]))
                             depends.add(taskid)
                 irdepends = taskData.tasks_irdepends[task]
                 for (depid, idependtask) in irdepends:
@@ -482,7 +482,7 @@  class RunQueueData:
                         if depdata is not None:
                             taskid = taskData.gettask_id_fromfnid(depdata, idependtask)
                             if taskid is None:
-                                bb.msg.fatal("RunQueue", "Task %s in %s rdepends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, dep))
+                                bb.msg.fatal("RunQueue", "Task %s in %s rdepends upon non-existent task %s in %s" % (taskData.tasks_name[task], fn, idependtask, taskData.fn_index[depdata]))
                             depends.add(taskid)
 
                 # Resolve recursive 'recrdeptask' dependencies (Part A)