Re: Best way to mask bbappends based on Poky version to have a layer support multiple versions of Poky?
toggle quoted messageShow quoted text
Thanks for the info. I think both of those will run into issues where the bbappend won't apply to the original recipe as that is fully done by path and file name and both of these methods mangle those. Please correct me if I'm wrong as there might be some cheese down that tunnel for me.
I've been thinking more about this over the weekend and have rethought the problem a bit. I think what I really want is to be able to conditionally skip a bbappend in recipe using python rather than having to do this centralized in the layer.conf with BBMASK. There are two reasons for this:
1) This puts the logic that skips the bbappend in the file itself which makes it more obvious what is going on when browsing/maintaining meta-data. The BBMASK method is centralized, but is hidden when you are just working with the metadata.
2) This allows for arbitrary and more complex logic for skipping bbappends.
I'm not super familiar with the internals of bitbake, but I think what I want is something similar to the bb.parse.SkipRecipe() exception. For example
# Skip based on poky version
if d.getVar("DISTRO_CODENAME") != 'zeus':
raise bb.parse.SkipBbappend("This bbappend only supports Zeus. Skipping this bbappend")
# Skip based on package version
if d.getVar("PV") != '1.0':
raise bb.parse.SkipBbappend("This bbappend only supports version 1.0 of test. Skipping bbappend")
1) Does this seem like a good solution to the problem of dangling appends in layers that want to support two versions of Poky?
2) Any thoughts on how to go about implementing this?
On Thu, Mar 26, 2020 at 4:09 PM Konrad Weihmann <kweihmann@...> wrote: