If you use devtool add on a kernel source tree, a kernel recipe is generated based on the one in meta-skeleton. However in order to actually build that, PREFERRED_PROVIDER_virtual/kernel needs to be changed. If we're not inside the eSDK then we can just display a warning, but within the eSDK the configuration is controlled so we can just change it within the tool. Presumably we'd only want to allow having one kernel recipe in the workspace at a time though.
A further thought - we might want to implement this generically for any configured PREFERRED_PROVIDER rather than just doing it specifically for PREFERRED_PROVIDER_virtual/kernel.
bug 11102 must be completed in order to fully test this enhancement.
(In reply to comment #1) > A further thought - we might want to implement this generically for any > configured PREFERRED_PROVIDER rather than just doing it specifically for > PREFERRED_PROVIDER_virtual/kernel. Paul, at least for the kernel, this is the proposed patch http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lsandov1/devtool-override-prefered-kernel This is done on the add plugin.
The dependency is not complete yet, so moving it to next milestone.
Paul: can you elaborate on why setting PREFERRED_PROVIDER should be done in other place rather than at the add plugin as Leo's proposal? (scripts/lib/devtool/standard.py) So far, I manually included the missing directory mentioned in bug 11102 to be able to test Leo's patch and it allows to successfully create the recipe with devtool add and then remove it using devtool reset (solves the errors "Nothing PROVIDES 'ly2'", "ly2 was skipped: Set PREFERRED_PROVIDER_virtual/kernel to ly2 to enable it").
It's not about where it is set, it's about handling the generic PREFERRED_PROVIDER mechanism rather than doing it specifically for PREFERRED_PROVIDER_virtual/kernel. I would suggest iterating over the items in PROVIDES and then check if PREFERRED_PROVIDER for each one is set to a value that it is different to PN for the recipe we are dealing with. BTW, the proposed patch cannot work, it sets PREFERRED_PROVIDER_virtual/kernel in a bbappend which will not take effect. In order to work this needs to be set at the configuration level.