From: Osama Abdelkader <osama.abdelkader@gmail.com>
To: Ross Burton <Ross.Burton@arm.com>
Cc: yocto@lists.yoctoproject.org, bitbake-devel@lists.openembedded.org
Subject: Re: [yocto] [RFC] Proposal: New tool to display recipe dependency trees
Date: Tue, 25 Nov 2025 22:26:16 +0200 [thread overview]
Message-ID: <aSYQ6IxFgosukd2B@osama> (raw)
In-Reply-To: <74C05E37-CEB7-49C9-AA53-CCA988FC7E7B@arm.com>
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 <osama.abdelkader=gmail.com@lists.yoctoproject.org> 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
prev parent reply other threads:[~2025-11-25 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSYQ6IxFgosukd2B@osama \
--to=osama.abdelkader@gmail.com \
--cc=Ross.Burton@arm.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox