[oe-commits] [bitbake] 01/02: cooker: Sort task graph (dot) file output
git at git.openembedded.org
git at git.openembedded.org
Sun Jan 28 11:22:41 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Jan 26 22:35:13 2018 +0000
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 at linuxfoundation.org>
---
lib/bb/cooker.py | 12 ++++++------
1 file 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))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list