[OE-core] [PATCH V2 1/1] bitbake-layers: add a ability to query layer dependencies from layer index
Paul Eggleton
paul.eggleton at linux.intel.com
Thu Jan 15 14:20:39 UTC 2015
Hi Chong,
On Monday 12 January 2015 14:48:42 Chong Lu wrote:
> It maybe depends on other layers when one layer is added to BBLAYERS. If
> define LAYERDEPENDS variable in this layer, we will get error from bitbake.
> But sometimes, we don't have defined. Add a mechanism to extend
> bitbake-layers and it will query layer dependencies from layer index
> (http://layers.openembedded.org/layerindex/api/)
> Use `bitbake-layers show-layer-dependencies' to find out dependencies and
> update bblayers.conf as appropriate.
OK, so this is actually a patch against bitbake and thus should be sent to the
bitbake mailing list instead.
Having said that, I have looked over the code. This is definitely a step in the
right direction, however I would make the following comments:
1) Since this is for bitbake we can't really have hardcoded references to the
OE layer index in the code. I'd suggest we have bitbake-layers query a
variable e.g. BITBAKE_LAYERINDEX_URL, and then separately patch OE to set that
from conf/bitbake.conf. (It should also give a sensible error if the variable
isn't set for some reason.)
2) I think this could be a bit more practical in terms of usage. As described
in the bug I was thinking of a command for which you would specify the name of
a layer you wanted to use, and then bitbake-layers would call the layer index,
find the specified layer and all of its dependencies, fetch them, then add them
to bblayers.conf. This kind of does the first part but leaves the rest to the
user - I think we can go a bit further than that. FWIW as you may have seen I
did just add some code to make clean modifications to bblayers.conf which may
be useful for part of this.
For #2 there may be a slight problem to solve, which is that whatever
equivalent of OE-Core you have on your local disk needs to be considered
equivalent to the "oe-core" layer in the layer index so you don't end up
adding that. Toaster has solved this same issue, but in a way that won't work
here, so we might have to figure out an alternative solution.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list