Re: How to maintain meta layer with different versions of recipes?

Khem Raj

On Mon, Dec 5, 2022 at 8:23 AM Sourabh Hegde <hrsourabh011@...> wrote:


I have a generic use-case of maintaining the meta layer. I have a custom meta layer. But this layer serves multiple customers who share most of the recipes and files. But some files are customer-specific. Currently, I am using different repos and tags in gitlab but regularly updating them is tedious and time-consuming. Rather I am think to create to create a generic meta layer and use Yocto features/variables (if existing) to maintain different versions. For example, a recipe has FILES_${PN} += "/lib/systemd/system/test.service \ "
But the contents of "test.service" is customer-specific and different versions has to be maintained. So, is there any way to make this generic? Can this be done using .bbappend files?
Few things comes to mind. You could deploy the systemd unit fragment strategy
so any customizations you have could be done via these drop-ins and
keeping common service file
these drops can be then controlled via customer distro specific
override in your main bb itself.

Second, way would be to have test.service copies installed under
files/<customer-override>/ directory next to recipe
and then define customer distro specific overrides

I assume this might be the use case of many people..

Thanks in advance

Join { to automatically receive all group messages.