[Openembedded-architecture] layer.conf and layerindex change proposal
Paul Eggleton
paul.eggleton at linux.intel.com
Thu Jun 9 03:48:08 UTC 2016
On Wed, 08 Jun 2016 18:01:44 Mark Hatle wrote:
> On 6/8/16 5:24 PM, Richard Purdie wrote:
> > On Wed, 2016-06-08 at 16:15 -0500, Mark Hatle wrote:
> >> In addition, many of the layers I work with have a clear set of
> >> required layers
> >> (LAYERDEPENDS), but also have 'recommended' layers... So I'd love to
> >> see a
> >> LAYERRECOMMENDS as well.
> >>
> >> For this one, in bitbake, we could add the LAYERRECOMMENDS to the
> >> priority
> >> sorting code -- but if the layer is not included it's not an error or
> >> warning.
> >
> > I don't understand this. Why would the fact a layer recommends another
> > layer change priority sorting code? I don't think the dependency
> > variable does that?
>
> In bitbake/lib/bb/cooker.py:
>
>
> look around line 1148 and 1178.
>
>
> The existing LAYERDEPENDS does influence the priority in some way. (First
> chunk verifies dependencies, second is a function that actually calculates
> layer priority based on results of the validation.) I was actually
> surprised to see this code, I didn't realize the system did this in any
> way...
Heh, it's one of those times when you think "what? who wrote that code?" and
then you find out it was yourself 5 years ago. I vaguely remember writing this
but not much about the intent, however if you look at the commit message it's
supposed to set the priority automatically *only* if the priority isn't
specified, and a cursory look at calc_layer_priority() seems to verify that.
Here's the commit message:
http://git.openembedded.org/bitbake/commit/?id=115b89fa279b64e79da0f72caf7b30965a83fab1
There's also a reference to the following bugzilla entry:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=790
Due to copying other layer.conf boilerplate most layers do specify a priority
and therefore I suspect this code is rarely exercised in practice.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-architecture
mailing list