Search code examples
yoctobitbake

Yocto: How to know why a package is included?


This is a old question, I know

Yocto: why is a package included?

Why is package included in Yocto rootfs?

but there is not satisfactory answer.

I get valgrind inside my yocto custom image (sustitute valgrind with whatever package name) and I do not why.

Valgrin's recipe RDEPENDS variable show what packages will be installed in the image for valgrind runs.

Is there any way to know the reverse function? that is, what recipe has in his RDEPENDS valgrind?

bitbake -g valgrind or find valgrind in recipes files do not help.


Solution

  • Thanks for your answer @aehs29, very instructive, but there are many packages built but not installed.

    I undestand bitbake -g <image-recipe> tell me build dependencies, not runtime dependencies and, yes, my custom image has a build dependency from valgrind but I am not able to get information about who is the guilty in task-depends.dot file.

    valgrind is not listed in bitbake -e | grep PACKAGE_INSTALL, so no luck.

    I am using ipkg packages, so log.do_rootfs file don't show the package dependencies table.

    Look into packages files is not feasible because there are many non-installed packages with valgrind dependencies.

    The strategy has been first, build the image and then, delete the valgrind recipe, try to build the image again and analize the error.

    user@build:~/home/user/yocto-local/build$ bitbake mycustom-image
    Loading cache: 100%   |######################| Time: 0:00:01
    Loaded 4841 entries from dependency cache.
    NOTE: Resolving any missing task queue dependencies
    ERROR: Nothing RPROVIDES 'valgrind' (but /home/user/yocto-local/sources/meta-imx/meta-bsp/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.2-aarch64.bb RDEPENDS on or otherwise requires it)
    NOTE: Runtime target 'valgrind' is unbuildable, removing...
    Missing or unbuildable dependency chain was: ['valgrind']
    NOTE: Runtime target 'opencv' is unbuildable, removing...
    Missing or unbuildable dependency chain was: ['opencv', 'virtual/opencl-icd', 'valgrind']
    ERROR: Required build target 'mycustom-image' has no buildable providers.
    Missing or unbuildable dependency chain was: ['mycustom-image', 'opencv', 'virtual/opencl-icd', 'valgrind']
    
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
    

    I believe this is not a "formal" practice, but I have not found another.