[Openembedded-architecture] layer.conf and layerindex change proposal
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Thu Jun 9 23:44:54 UTC 2016
> -----Original Message-----
> From: openembedded-architecture-bounces at lists.openembedded.org
> [mailto:openembedded-architecture-bounces at lists.openembedded.org] On
> Behalf Of Paul Eggleton
> Sent: den 9 juni 2016 05:48
> To: Mark Hatle
> Cc: openembedded-architecture at lists.openembedded.org
> Subject: Re: [Openembedded-architecture] layer.conf and layerindex
> change proposal
>
> 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.
Don't bet on it. We rely on this feature for all our layers...
It is somewhat documented in the manual in the section about
BBFILE_PRIORITY. However, it just says that if BBFILE_PRIORITY is
not specified, then the layer's priority is based on layer
dependencies, but it does not state how. There is a reference to
LAYERDEPENDS for more information, but its documentation does not
touch on the subject of priorities.
> Cheers,
> Paul
//Peter
More information about the Openembedded-architecture
mailing list