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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#66045): https://lists.yoctoproject.org/g/yocto/message/66045
Mute This Topic: https://lists.yoctoproject.org/mt/116455161/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to