Browse Source

taskdata: Don't add dependencies on tasks that don't exist

"bitbake meta-toolchain" with qemu image testing enabled causes problems
since it adds a task after do_rootfs which doesn't exist in this case.

We should simply ignore these extra dependencies rather than adding
them in which is what this patch does (adding a debug message when this
happens).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 11 years ago
parent
commit
843d3d6b0a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/bb/taskdata.py

+ 3 - 0
lib/bb/taskdata.py

@@ -176,6 +176,9 @@ class TaskData:
             # Work out task dependencies
             parentids = []
             for dep in task_deps['parents'][task]:
+                if dep not in task_deps['tasks']:
+                    bb.debug(2, "Not adding dependeny of %s on %s since %s does not exist" % (task, dep, dep))
+                    continue
                 parentid = self.gettask_id(fn, dep)
                 parentids.append(parentid)
             taskid = self.gettask_id(fn, task)