Re: [yocto] [RFC] Proposal: New tool to display recipe dependency trees
Ross Burton <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto,org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <[email protected]> |
On 24 Nov 2025, at 17:24, Osama Abdelkader via lists.yoctoproject.org <[email protected]> wrote: > > 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 > Note that the build-time and run-time dependency trees will be a _lot_ deeper than that. The ability to mark some dependencies as “soft roots” (eg gcc-cross, glibc) and optionally stop at them would be useful. > Is this functionality valuable upstream? Would BitBake benefit from such a tool? Yes > 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? I’d say this is a question for later, the question for now is “make it work”. > Preferred output format(s)? > Plain ASCII tree (default) > JSON And HTML/SVG graphs. > Should the tool: > > cover only DEPENDS (build-time)? > include RDEPENDS with pkgdata? > resolve virtual/ providers? Yes to all. > Any prior work I may have missed? bitbake’s own taskexp (bitbake -g taskexp) is basically this with more granularity (because it’s task dependencies, not recipe) and without the drawing of an actual tree (partly because I just implemented it as a three pane window for convenience. oe-pkgdata-browser (oe-core/scripts) and pkgexp (https://gitlab.com/rossburton/pkgexp) let you dig around the pkgdata interactively. bitbake-whatdepends does basic processing on the dot file output from bitbake to let you see _why_ recipe A depends on recipe B. Many people ask for this tool, so I hope you manage to implement something that works well. I’ve started a few times, but never finished… Ross