* [PATCH 0/1] cooker.py: use depends instead of tdepends to generate recipe-depends.dot
@ 2019-08-21 9:01 Chen Qi
2019-08-21 9:01 ` [PATCH 1/1] " Chen Qi
0 siblings, 1 reply; 3+ messages in thread
From: Chen Qi @ 2019-08-21 9:01 UTC (permalink / raw)
To: bitbake-devel
*** BLURB HERE ***
The following changes since commit 20946c63c272b2128e6dc76490313b174ee97d8e:
bitbake: runqueue: Ensure target_tids is filtered (2019-08-16 10:05:33 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/recipe-depends
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/recipe-depends
Chen Qi (1):
cooker.py: use depends instead of tdepends to generate
recipe-depends.dot
bitbake/lib/bb/cooker.py | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/1] cooker.py: use depends instead of tdepends to generate recipe-depends.dot 2019-08-21 9:01 [PATCH 0/1] cooker.py: use depends instead of tdepends to generate recipe-depends.dot Chen Qi @ 2019-08-21 9:01 ` Chen Qi 2019-08-21 14:28 ` Richard Purdie 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2019-08-21 9:01 UTC (permalink / raw) To: bitbake-devel Currently recipe-depends.dot generated by `bitbake -g' is just a variant of task-depends.dot. It could be generated by removing the task names from task-depends.dot. In fact, the codes are using the same data depgraph['tdepends'] to generate the dot files. In other words, the current recipe-depends.dot does not provide additional information than task-depends.dot. What's worse, this is confusing users when they try to find out the dependencies among recipes. e.g. $ grep xz recipe-depends.dot | grep bzip2 "bzip2" -> "xz" "xz" -> "bzip2" They would ask why 'bzip2' depends on 'xz' while 'xz' also depends on 'bzip2'. It looks like a circular dependency. And it's not helping user finding out which recipe depends on which. So change to use depgraph['depends'] to generate the recipe-depends.dot. After the change, there's no such confusing. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- bitbake/lib/bb/cooker.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 0607fcc..4628f08 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -934,19 +934,12 @@ class BBCooker: with open('recipe-depends.dot', 'w') as f: f.write("digraph depends {\n") - pndeps = {} - for task in sorted(depgraph["tdepends"]): - (pn, taskname) = task.rsplit(".", 1) - if pn not in pndeps: - pndeps[pn] = set() - for dep in sorted(depgraph["tdepends"][task]): - (deppn, deptaskname) = dep.rsplit(".", 1) - pndeps[pn].add(deppn) - for pn in sorted(pndeps): + for pn in sorted(depgraph["depends"]): + deps = depgraph["depends"][pn] 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 sorted(pndeps[pn]): + for dep in sorted(deps): if dep == pn: continue f.write('"%s" -> "%s"\n' % (pn, dep)) -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] cooker.py: use depends instead of tdepends to generate recipe-depends.dot 2019-08-21 9:01 ` [PATCH 1/1] " Chen Qi @ 2019-08-21 14:28 ` Richard Purdie 0 siblings, 0 replies; 3+ messages in thread From: Richard Purdie @ 2019-08-21 14:28 UTC (permalink / raw) To: Chen Qi, bitbake-devel On Wed, 2019-08-21 at 17:01 +0800, Chen Qi wrote: > Currently recipe-depends.dot generated by `bitbake -g' is just > a variant of task-depends.dot. It could be generated by removing the > task names from task-depends.dot. In fact, the codes are using the > same data depgraph['tdepends'] to generate the dot files. > > In other words, the current recipe-depends.dot does not provide > additional > information than task-depends.dot. > > What's worse, this is confusing users when they try to find out the > dependencies among recipes. > > e.g. > $ grep xz recipe-depends.dot | grep bzip2 > "bzip2" -> "xz" > "xz" -> "bzip2" > > They would ask why 'bzip2' depends on 'xz' while 'xz' also > depends on 'bzip2'. It looks like a circular dependency. And it's not > helping user finding out which recipe depends on which. > > So change to use depgraph['depends'] to generate the recipe- > depends.dot. > After the change, there's no such confusing. We can't win with this and I'd rather remove it than give misleading information. "depends" doesn't account for rdepends or task dependencies so after this change, task-depends could show A -> B but recipe-depends.dot and this is even more confusing to the user. http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/cooker.py?id=6cfc1c83b90c9c9dd5290749aed49896327739e6 is the commit where we attempted to fix this. Keeping a "flattened tree" was done to try and help users but I don't want to go back to where we had misleading information which using "depends" would do. Cheers, Richard ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-21 14:28 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-08-21 9:01 [PATCH 0/1] cooker.py: use depends instead of tdepends to generate recipe-depends.dot Chen Qi 2019-08-21 9:01 ` [PATCH 1/1] " Chen Qi 2019-08-21 14:28 ` Richard Purdie
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.