| Summary: | Implement whitelisting for packages from imported layers | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Alexander Kanevskiy <alexander.kanevskiy> |
| Component: | bitbake | Assignee: | Paul Eggleton <bluelightning> |
| Status: | VERIFIED WONTFIX | QA Contact: | Lucian Musat <georgex.l.musat> |
| Severity: | enhancement | ||
| Priority: | High | CC: | bluelightning, bogdanx.a.voiculescu, jackie.huang, liezhi.yang, patrick.ohly, poky.bs.watcher, poky.watcher, randy.macleod |
| Version: | 1.9 | ||
| Target Milestone: | 1.9 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Alexander Kanevskiy
2015-08-11 12:44:58 UTC
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. |