In our custom distribution we need to provide enough content in our binary package feed repositories. To populate those, we would like to use already existing layers like meta-oe from OpenEmbedded.org, but downside is that those repositories are providing so many recipes that we don't need to build or want to ship and respectively don't allow developer to build (unsupported set of recipes). Using blacklisting feature is not really possible, as package set can be often changed and list would grow fast. Thus needed functionality with behaviour "skip all recipes in layer XXX except ones explicitly allowed". Those options can be located in distro specific configuration files, and should be layer specific. E.g. allow package "gtest" from custom layer, but skip it from "meta-oe".
FWIW, a function was added to bitbake's lib/bb/utils.py in order to make this possible - see bug 7723. With that it's pretty easy to add a class that you can inherit globally that raises SkipRecipe if the recipe is from a particular layer and isn't whitelisted.
Yes, bug 7723 was prework for this feature. It shouldn't be hard to implement as we already discussed offline with Richard and Paul. However, I've created that item specifically to get proper design on how to implement it from ideological point of view and make feature really usable. E.g. how to name variables, how to make sure that it can be properly controlled on distro configuration level, etc.
We wrote a script to replay all commits and output a white-listed subset of a layer, preserving the original commit id in the long log. That works but it's slow, tedious and doesn't let naive users easily discover what they _could_ add without needing to clone meta-oe or find and use the layers index. We may drop the meta-oe-subset approach if a good white-list work-flow can be agreed upon.
I've put together an initial implementation here: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=paule/whitelist
Looks good enough for me to get to community review and initial testing.
I tried with the patch but it doesn't work with multilib and -native cases, you may need something like: - if not d.getVar('PN', True) in whitelist.split(): + if not d.getVar('BPN', True) in whitelist.split(): or other way to properly handle multilib.
OK, I've switched to BPN, tweaked the comments a bit and sent it as an RFC patch to the OE-Core list.
Have sent a v2 with some changes: http://lists.openembedded.org/pipermail/openembedded-core/2015-August/109520.html
The patch implementing this has been rejected; the community would rather not support this kind of thing in OE-Core. Distro layers can carry and use the class if needed though.
Setting as verified as per last comment.