]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: cooker: Ensure all tasks are shown in task dependency tree
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Aug 2017 08:37:37 +0000 (09:37 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Aug 2017 10:14:13 +0000 (11:14 +0100)
"bitbake -g m4-native -c do_unpack" doesn't list any dependencies in
task-depends.dot. This is because no header describing the task was
added unless a task has dependencies. Tweak the code to fix this.

[YOCTO #10893]

(Bitbake rev: e2fbe728769f09ef4178e2ef4d69a2f60ffe3ebb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cooker.py

index 1a5e0038b6f1c6a2dd6ab5a6ca47c83d1a451f93..81027db26530798dd30bdf6d9d77b3198ac1f738 100644 (file)
@@ -678,12 +678,12 @@ class BBCooker:
                     depend_tree["pn"][pn][ei] = vars(self.recipecaches[mc])[ei][taskfn]
 
 
+            dotname = "%s.%s" % (pn, bb.runqueue.taskname_from_tid(tid))
+            if not dotname in depend_tree["tdepends"]:
+                depend_tree["tdepends"][dotname] = []
             for dep in rq.rqdata.runtaskentries[tid].depends:
                 (depmc, depfn, deptaskname, deptaskfn) = bb.runqueue.split_tid_mcfn(dep)
                 deppn = self.recipecaches[mc].pkg_fn[deptaskfn]
-                dotname = "%s.%s" % (pn, bb.runqueue.taskname_from_tid(tid))
-                if not dotname in depend_tree["tdepends"]:
-                    depend_tree["tdepends"][dotname] = []
                 depend_tree["tdepends"][dotname].append("%s.%s" % (deppn, bb.runqueue.taskname_from_tid(dep)))
             if taskfn not in seen_fns:
                 seen_fns.append(taskfn)