aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-26 22:35:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-28 11:20:26 +0000
commit5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d (patch)
treed96dd135ada4750579c31449dc91c944b8dec89f
parenta783bd7e457f183a279dbe5a4ef3d4c17bb4c18c (diff)
downloadbitbake-5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d.zip
bitbake-5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d.tar.gz
bitbake-5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d.tar.bz2
cooker: Sort task graph (dot) file output
This means two different graph files can easily be compared, currently you'd have to sort them as the output is randomized. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 28717f4..cd365f7 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -856,12 +856,12 @@ class BBCooker:
with open('task-depends.dot', 'w') as f:
f.write("digraph depends {\n")
- for task in depgraph["tdepends"]:
+ for task in sorted(depgraph["tdepends"]):
(pn, taskname) = task.rsplit(".", 1)
fn = depgraph["pn"][pn]["filename"]
version = depgraph["pn"][pn]["version"]
f.write('"%s.%s" [label="%s %s\\n%s\\n%s"]\n' % (pn, taskname, pn, taskname, version, fn))
- for dep in depgraph["tdepends"][task]:
+ for dep in sorted(depgraph["tdepends"][task]):
f.write('"%s" -> "%s"\n' % (task, dep))
f.write("}\n")
logger.info("Task dependencies saved to 'task-depends.dot'")
@@ -869,18 +869,18 @@ class BBCooker:
with open('recipe-depends.dot', 'w') as f:
f.write("digraph depends {\n")
pndeps = {}
- for task in depgraph["tdepends"]:
+ for task in sorted(depgraph["tdepends"]):
(pn, taskname) = task.rsplit(".", 1)
if pn not in pndeps:
pndeps[pn] = set()
- for dep in depgraph["tdepends"][task]:
+ for dep in sorted(depgraph["tdepends"][task]):
(deppn, deptaskname) = dep.rsplit(".", 1)
pndeps[pn].add(deppn)
- for pn in pndeps:
+ for pn in sorted(pndeps):
fn = depgraph["pn"][pn]["filename"]
version = depgraph["pn"][pn]["version"]
f.write('"%s" [label="%s\\n%s\\n%s"]\n' % (pn, pn, version, fn))
- for dep in pndeps[pn]:
+ for dep in sorted(pndeps[pn]):
if dep == pn:
continue
f.write('"%s" -> "%s"\n' % (pn, dep))