Nowadays, projects usually have a set of layers to provide the required features. We certainly need to make changes on top of them to adapt them to our specific needs. They may be cosmetic or substantive changes, but the way to make them is the same.
To make changes to a preexisting recipe, we need to create a .bbappend
file in our project layer. The name of the file is the same as the original recipe, along with the append
suffix. For example, if the original recipe was named <original-layer>/recipes-core/app/app_1.0.bb
, our respective .bbappend
will be <layer>/recipes-core/app/app_1.0.bbappend
.
The .bbappend
file can be seen as a piece of text that is appended at the end of the original recipe. It empowers us with an extremely flexible mechanism to avoid duplicating source code in order to apply the required changes to our project's layers.