All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake.conf: fix ineffective include conf/target/${TARGET_SYS}.conf
@ 2017-02-22 10:21 Andre McCurdy
  2017-08-24  9:35 ` Patrick Ohly
  0 siblings, 1 reply; 3+ messages in thread
From: Andre McCurdy @ 2017-02-22 10:21 UTC (permalink / raw)
  To: openembedded-core

TARGET_SYS is defined in terms of TARGET_ARCH, so it's not valid
until after TUNE_ARCH has been set by the machine config. The
original order of includes resulted in an attempt to include
non-existent files such as:

  conf/target/INVALID-oe-linux.conf

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e421650..18d1cfb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -705,9 +705,9 @@ include conf/auto.conf
 include conf/local.conf
 require conf/multiconfig/${BB_CURRENT_MC}.conf
 include conf/build/${BUILD_SYS}.conf
-include conf/target/${TARGET_SYS}.conf
 include conf/machine/${MACHINE}.conf
 include conf/machine-sdk/${SDKMACHINE}.conf
+include conf/target/${TARGET_SYS}.conf
 include conf/distro/${DISTRO}.conf
 include conf/distro/defaultsetup.conf
 include conf/documentation.conf
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bitbake.conf: fix ineffective include conf/target/${TARGET_SYS}.conf
  2017-02-22 10:21 [PATCH] bitbake.conf: fix ineffective include conf/target/${TARGET_SYS}.conf Andre McCurdy
@ 2017-08-24  9:35 ` Patrick Ohly
  2017-08-24  9:58   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Ohly @ 2017-08-24  9:35 UTC (permalink / raw)
  To: Andre McCurdy, openembedded-core

On Wed, 2017-02-22 at 02:21 -0800, Andre McCurdy wrote:
> TARGET_SYS is defined in terms of TARGET_ARCH, so it's not valid
> until after TUNE_ARCH has been set by the machine config. The
> original order of includes resulted in an attempt to include
> non-existent files such as:
> 
>   conf/target/INVALID-oe-linux.conf
> 
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---
>  meta/conf/bitbake.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index e421650..18d1cfb 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -705,9 +705,9 @@ include conf/auto.conf
>  include conf/local.conf
>  require conf/multiconfig/${BB_CURRENT_MC}.conf
>  include conf/build/${BUILD_SYS}.conf
> -include conf/target/${TARGET_SYS}.conf
>  include conf/machine/${MACHINE}.conf
>  include conf/machine-sdk/${SDKMACHINE}.conf
> +include conf/target/${TARGET_SYS}.conf
>  include conf/distro/${DISTRO}.conf

I think conf/target/${TARGET_SYS}.conf must be included after
${DISTRO}.conf, because TARGET_SYS contains
${TARGET_ARCH}${TARGET_VENDOR} and TARGET_VENDOR gets changed by a
${DISTRO}.conf like poky.conf.

I also found this issue when writing an automated test that detects
when include file names change while parsing, and I agree that it
should be either fixed or removed.

See the "Yocto Compatible 2.0 support code" mail thread for details. At
that time I had missed that there was already a pending patch for it.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bitbake.conf: fix ineffective include conf/target/${TARGET_SYS}.conf
  2017-08-24  9:35 ` Patrick Ohly
@ 2017-08-24  9:58   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2017-08-24  9:58 UTC (permalink / raw)
  To: Patrick Ohly, Andre McCurdy, openembedded-core

On Thu, 2017-08-24 at 11:35 +0200, Patrick Ohly wrote:
> On Wed, 2017-02-22 at 02:21 -0800, Andre McCurdy wrote:
> > 
> > TARGET_SYS is defined in terms of TARGET_ARCH, so it's not valid
> > until after TUNE_ARCH has been set by the machine config. The
> > original order of includes resulted in an attempt to include
> > non-existent files such as:
> > 
> >   conf/target/INVALID-oe-linux.conf
> > 
> > Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> > ---
> >  meta/conf/bitbake.conf | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index e421650..18d1cfb 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -705,9 +705,9 @@ include conf/auto.conf
> >  include conf/local.conf
> >  require conf/multiconfig/${BB_CURRENT_MC}.conf
> >  include conf/build/${BUILD_SYS}.conf
> > -include conf/target/${TARGET_SYS}.conf
> >  include conf/machine/${MACHINE}.conf
> >  include conf/machine-sdk/${SDKMACHINE}.conf
> > +include conf/target/${TARGET_SYS}.conf
> >  include conf/distro/${DISTRO}.conf
> I think conf/target/${TARGET_SYS}.conf must be included after
> ${DISTRO}.conf, because TARGET_SYS contains
> ${TARGET_ARCH}${TARGET_VENDOR} and TARGET_VENDOR gets changed by a
> ${DISTRO}.conf like poky.conf.
> 
> I also found this issue when writing an automated test that detects
> when include file names change while parsing, and I agree that it
> should be either fixed or removed.
> 
> See the "Yocto Compatible 2.0 support code" mail thread for details.
> At
> that time I had missed that there was already a pending patch for it.

I think I'd prefer just to delete the use of TARGET_SYS.conf and
possibly BUILD_SYS.conf too, I'm not aware of any users in practice as
it can't really work at least in one case...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-24  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 10:21 [PATCH] bitbake.conf: fix ineffective include conf/target/${TARGET_SYS}.conf Andre McCurdy
2017-08-24  9:35 ` Patrick Ohly
2017-08-24  9:58   ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.