public inbox for yocto@lists.yoctoproject.org
 help / color / mirror / Atom feed
* [RFC] Proposal: New tool to display recipe dependency trees
@ 2025-11-24 17:24 Osama Abdelkader
  2025-11-24 18:04 ` [bitbake-devel] " Alexander Kanavin
  2025-11-24 20:49 ` [yocto] " Ross Burton
  0 siblings, 2 replies; 9+ messages in thread
From: Osama Abdelkader @ 2025-11-24 17:24 UTC (permalink / raw)
  To: yocto; +Cc: bitbake-devel

Hi All,

I would like to propose adding a new command-line tool (or BitBake subcommand) that generates
dependency trees, including:

DEPENDS (build-time)
RDEPENDS (runtime)
Optional graph output (text, JSON)

Motivation

Currently, BitBake provides:

bitbake -g produces task-depends.dot (task-level, not recipe-level, must use graphviz)
oe-pkgdata-util runtime dependency only
bitbake -e <recipe> view variables, but manually
Errors from the dependency resolver (if a recipe is missing)

But there is no built-in CLI tool to display a recipe dependency tree, e.g.:

bitbake-deptree dnf

dnf
 ├── libdnf
 │    ├── libsolv
 │    └── json-c
 └── sqlite3


Such a tool would help:

layer developers understanding complex deps
learning how Yocto resolves recipe names, PROVIDES, virtual/ mappings
documenting or visualizing architecture

I started experimenting with a prototype using Tinfoil to walk DEPENDS and collect data through BitBake’s recipecache, and it seems feasible.

Questions for the community

Before developing this further, I would like guidance on the following:

Is this functionality valuable upstream? Would BitBake benefit from such a tool?

Where should it live?
Options I see:

new BitBake subcommand (e.g. bitbake-deptree)
extension to oe-pkgdata-util
standalone Python tool under scripts/
part of devtool?

Preferred output format(s)?
Plain ASCII tree (default)
JSON


Should the tool:

cover only DEPENDS (build-time)?
include RDEPENDS with pkgdata?
resolve virtual/ providers?

Any prior work I may have missed?

If the idea is acceptable, I will prepare a proper implementation and send a patchset to the appropriate mailing list.
Thank you for your feedback!

Best regards,
Osama


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-11-25 20:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24 17:24 [RFC] Proposal: New tool to display recipe dependency trees Osama Abdelkader
2025-11-24 18:04 ` [bitbake-devel] " Alexander Kanavin
2025-11-24 18:20   ` Quentin Schulz
2025-11-24 18:48     ` Osama Abdelkader
2025-11-24 18:42   ` Osama Abdelkader
2025-11-24 18:53     ` Alexander Kanavin
2025-11-25 20:15       ` Osama Abdelkader
2025-11-24 20:49 ` [yocto] " Ross Burton
2025-11-25 20:26   ` Osama Abdelkader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox