Re: bbappend usage

Konrad Weihmann <kweihmann@...>

The super yoctoish way would be to alter the packaging of the recipe to your needs.

Let's assume recipe-a consists of the files


and it would package both files into recipe-a pkg.

In the actual image you only install packages into a file system, so if you don't want bar to be installed into your final image, it'd be best to package bar into a separate package.

FILES:${PN}-bar = "bar"

in this case the recipe would produce

recipe-a (containing just foo)
recipe-a-bar (containing just bar)

You could install now (via IMAGE_INSTALL in your image recipe) just add recipe-a and only foo would be put into the final image.

While a potential other image (IMAGE_INSTALL += "recipe-a-bar recipe-a")
would contain both.

But if you'd go down that road you have to make sure that runtime dependencies between the packages are met (using REDEPENDS:* statements), as otherwise it could turn into very hard to debug issues.
So I would propose to **not** do that via bbappends, but forks of the recipes you want to repackage.

Another option (as likely mentioned already) is to use

rem_stuff() {
rm ${IMAGE_ROOTFS}/<file you want to delete>


in your image recipe

On 25.10.21 14:55, Monsees, Steven C (US) via wrote:
If I am building an image “image-ABC”, and it is composed of a number recipes, and for some of these recipes I may NOT want to install their final components within my image…
Which is the best place to modify the build with bbappend ?
Would I modify a recipe’s do_install (do_install_append-recipe_xyz) ?, or would I modify the image recipe (do_install_append-image_ABC) I am leaning this way to avoid cases where the component recipes might have bbappends in place already ?
Looking for the proper Yocto way…

Join to automatically receive all group messages.