Patchwork [03/30] conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES

login
register
mail settings
Submitter Saul Wold
Date May 10, 2011, 5:26 a.m.
Message ID <491cfc546a2843493cf466c1e1af11ec8ac2dcee.1305004776.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/3593/
State New, archived
Headers show

Comments

Saul Wold - May 10, 2011, 5:26 a.m.
From: Khem Raj <raj.khem@gmail.com>

Appending to BBPATH gives a definite order to BBLAYERS which
means paths are preferred in order from left to right.

[sgw: merged in comment]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/conf/layer.conf |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Richard Purdie - May 10, 2011, 8:54 a.m.
On Mon, 2011-05-09 at 22:26 -0700, Saul Wold wrote:
> From: Khem Raj <raj.khem@gmail.com>
> 
> Appending to BBPATH gives a definite order to BBLAYERS which
> means paths are preferred in order from left to right.
> 
> [sgw: merged in comment]
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta/conf/layer.conf |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
> index 3f63c7d..10a6948 100644
> --- a/meta/conf/layer.conf
> +++ b/meta/conf/layer.conf
> @@ -2,7 +2,15 @@ BBPATH ?= ""
>  # We have a conf and classes directory, add to BBPATH
>  BBPATH .= ":${LAYERDIR}"
>  # We have a packages directory, add to BBFILES
> -BBFILES += "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb"
> +# packages is still there because metadata_scm.bbclass still uses
> +# it to deduce the repo directory and thats the reason to prepend
> +# to BBFILES here because this class uses the first entry in
> +# BBFILES to calculate the scm base.
> +# since the order of BBFLILES is not that important its acted upon
> +# using BBFILES_PRIORITY we are ok to keep the oe-core BBFILES dir
> +# at top

Er, how about we actually fix metadata_scm.bbclass instead of making the
world more complicated and fragile? :)

I suspect metadata_scm could use the COREBASE variable and be much nicer
code...

Cheers,

Richard
Khem Raj - May 10, 2011, 5:29 p.m.
On Tue, May 10, 2011 at 1:54 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Mon, 2011-05-09 at 22:26 -0700, Saul Wold wrote:
>> From: Khem Raj <raj.khem@gmail.com>
>>
>> Appending to BBPATH gives a definite order to BBLAYERS which
>> means paths are preferred in order from left to right.
>>
>> [sgw: merged in comment]
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>>  meta/conf/layer.conf |   10 +++++++++-
>>  1 files changed, 9 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
>> index 3f63c7d..10a6948 100644
>> --- a/meta/conf/layer.conf
>> +++ b/meta/conf/layer.conf
>> @@ -2,7 +2,15 @@ BBPATH ?= ""
>>  # We have a conf and classes directory, add to BBPATH
>>  BBPATH .= ":${LAYERDIR}"
>>  # We have a packages directory, add to BBFILES
>> -BBFILES += "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb"
>> +# packages is still there because metadata_scm.bbclass still uses
>> +# it to deduce the repo directory and thats the reason to prepend
>> +# to BBFILES here because this class uses the first entry in
>> +# BBFILES to calculate the scm base.
>> +# since the order of BBFLILES is not that important its acted upon
>> +# using BBFILES_PRIORITY we are ok to keep the oe-core BBFILES dir
>> +# at top
>
> Er, how about we actually fix metadata_scm.bbclass instead of making the
> world more complicated and fragile? :)
>
> I suspect metadata_scm could use the COREBASE variable and be much nicer
> code...
>
yes
OK let me see

> Cheers,
>
> Richard
>
>
>
Chris Larson - May 10, 2011, 5:56 p.m.
On Tue, May 10, 2011 at 1:54 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Er, how about we actually fix metadata_scm.bbclass instead of making the
> world more complicated and fragile? :)
>
> I suspect metadata_scm could use the COREBASE variable and be much nicer
> code...

I'd really like to see it gather information about the current state
of all layers which are scm working copies and summarize this in the
build summary, rather than grabbing one specific bit of information,
personally.
Richard Purdie - May 10, 2011, 6:56 p.m.
On Tue, 2011-05-10 at 10:56 -0700, Chris Larson wrote:
> On Tue, May 10, 2011 at 1:54 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Er, how about we actually fix metadata_scm.bbclass instead of making the
> > world more complicated and fragile? :)
> >
> > I suspect metadata_scm could use the COREBASE variable and be much nicer
> > code...
> 
> I'd really like to see it gather information about the current state
> of all layers which are scm working copies and summarize this in the
> build summary, rather than grabbing one specific bit of information,
> personally.

I'd also agree with this and have said as much somewhere (layer tooling
discussions?) but I'll take the COREBASE change short term.

Cheers,

Richard

Patch

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 3f63c7d..10a6948 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -2,7 +2,15 @@  BBPATH ?= ""
 # We have a conf and classes directory, add to BBPATH
 BBPATH .= ":${LAYERDIR}"
 # We have a packages directory, add to BBFILES
-BBFILES += "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb"
+# packages is still there because metadata_scm.bbclass still uses
+# it to deduce the repo directory and thats the reason to prepend
+# to BBFILES here because this class uses the first entry in
+# BBFILES to calculate the scm base.
+# since the order of BBFLILES is not that important its acted upon
+# using BBFILES_PRIORITY we are ok to keep the oe-core BBFILES dir
+# at top
+
+BBFILES =+ "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb"
 
 BBFILE_COLLECTIONS += "normal"
 BBFILE_PATTERN_normal := "^${LAYERDIR}/"