On Mon, Nov 24, 2025 at 08:49:31PM +0000, Ross Burton wrote: > 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
Thanks Ross, this is very helpful, I'm going to look at that and start the implementation soon. Will need your feedback for sure, but as you said, let's make it work first then we discuss further details in the patchset thread. BR, Osama
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#66067): https://lists.yoctoproject.org/g/yocto/message/66067 Mute This Topic: https://lists.yoctoproject.org/mt/116455161/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
