How to find which Yocto Project recipe populates a particular file on an image root filesystem
This is exact use case for oe-pkgdata-util
script and its subcommand find-path
. That script is part of openembedded-core.
See this example (executed in OE build environment, i.e. bitbake
works):
tom@pc:~/oe/build> oe-pkgdata-util find-path /lib/ld-2.24.soglibc: /lib/ld-2.24.so
You can clearly see that this library belongs to glibc recipe.
oe-pkgdata-util
has more useful subcommands to see information about packages and recipes, it worth to check the --help
.
If you prefer a graphical presentation, the Toaster web UI will also show you this, plus dependency information.
The candidate files deployed for each recipe are placed in each $WORKDIR/image
So you can cd to
$ cd ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}
and perform a
$ find . -path '*/image/*/fileYouAreLookingFor'
from the result you should be able to infer the ${PN} of the recipe which deploys such file.
For example:
$ find . -path '*/image/*/mc'./bash-completion/2.4-r0/image/usr/share/bash-completion/completions/mc./mc/4.8.18-r0/image/usr/share/mc./mc/4.8.18-r0/image/usr/bin/mc./mc/4.8.18-r0/image/usr/libexec/mc./mc/4.8.18-r0/image/etc/mc