Re: [bitbake-devel] [RFC] Proposal: New tool to display recipe dependency trees

Osama Abdelkader <[email protected]>
Newsgroups org.yoctoproject.lists.yocto,org.openembedded.lists.bitbake-devel
Message-ID <aSYOYgiB4gtFMB85@osama>
On Mon, Nov 24, 2025 at 07:53:52PM +0100, Alexander Kanavin wrote:
> On Mon, 24 Nov 2025 at 19:42, Osama Abdelkader
> <[email protected]> wrote:
> 
> > My motivation actually was so simple, to know why a certain package is needed in an image.
> > The simple way now AFAIK is to exclude it, then bitbake prints backtrace e.g.
> >
> > dnf
> >  ├── libdnf
> >  │    ├── libsolv
> >  │    └── json-c
> >  └── sqlite3
> >
> > dnf -> libdnf -> libsolv
> >
> > libsolv is needed for dnf. so would be good to have a query command or simple tool to show that?
> > something like apt-rdepends output.
> 
> Yes, absolutely, and this is missing. You can deduce it from 'bitbake
> -g', but it requires look at dependencies of particular tasks
> (package_write_* if memory serves) and ignoring all other task
> dependencies, and then making a mental dependency chain in your head
> if the dependency is indirect. This could probably be post-processed
> with some filtering tool to only make a tree of those dependencies,
> and present it in a human friendly tree format.
> 
> One other idea is to add a task to image recipes that would produce a
> tree of package dependencies. E.g. instead of making a package repo
> and then constructing a root filesystem from it with a package
> manager, it would use the repo to write out a tree of their
> dependencies - unrolling the top level packages that the image
> specifies to install. Probably it could use package managers like
> dnf/apt/opkg to assist with that.
> 
> Alex

Thanks Alex for the feedback, I'm going to work on that soon.

BR,
Osama
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.