Search code examples
yoctobitbake

Get description of packages in yocto image


I know I can get a list of packages included in an image using this command:

bitbake -g <image> && cat pn-buildlist | grep -ve "native" | sort | uniq

Is there a bitbake command to get the description of a specific package? Or perhaps there is a command to get all info on a package, I could simply grep the output of this.

Cheers!


Solution

  • It isn't a bitbake command, but there is oe-pkgdata-util utility (part of openembedded-core). It works in OE build environment (like bitbake). You can query a value from a built package (not recipe) using the read-value subcommand. The basic syntax is:

    oe-pkgdata-util read-value <value> <pkg1> [<pkg2>...]
    

    You can query multiple packages, prefix the name of package etc. Just check:

    oe-pkgdata-util read-value --help
    

    Here is an example for your question:

    tom@pc:~/oe/build> oe-pkgdata-util read-value DESCRIPTION libc6
    The GNU C Library is used as the system C library in most systems with the Linux kernel.
    

    BTW, you can query other variables like RDEPENDS, SUMMARY etc.

    Please note that if the DESCRIPTION variable is not set in the recipe, it is filled with content of a SUMMARY variable (see doc).


    Your question also mentions getting the list of packages in the image. I would say that there are more straightforward ways. For example:

    1. manifest file in the deploy dir (the file is next to the image file): ${DEPLOY_DIR}/images/${MACHINE}/${IMAGE_BASENAME}-${MACHINE}.manifest
    2. file installed-package-names.txt in buildhistory (if you've enabled it). It is inside the folder ${BUILDHISTORY_DIR}/images/${MACHINE_ARCH}/${TCLIBC}/${IMAGE_BASENAME}/.