* [RFC] Do postfiles make sense?
@ 2011-08-11 23:27 Joshua Lock
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Lock @ 2011-08-11 23:27 UTC (permalink / raw)
To: bitbake-devel
All,
Some time ago I added an -R switch to bitbake for configuration files to
load after bitbake.conf[1].
I'd been happily using this for the UI I've been working on without
fully realising that it's not safe to rely on postfiles to set variables
which affect the files included by bitbake.conf. For oe-core this
includes: BUILD_SYS, TARGET_SYS, MACHINE, SDKMACHINE and DISTRO.
In light of this flaw do postfiles make sense?
For the UI's purpose I think I'm going to have to switch to a prefile
(-r) in the wrapper script and add logic to hob to detect whether the
set variables differ from those in hob.local.conf - so that we can warn
those with a local.conf that uses = assignment that things won't work...
Thoughts? Suggestions?
Thanks,
Joshua
1.
http://git.openembedded.org/cgit.cgi/bitbake/commit/?id=a8246ae5400c23df0d3ee29c36f4d9f257d1e6d1
--
Joshua Lock
Yocto Project "Johannes Factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Do postfiles make sense?
[not found] <mailman.15.1313143204.31105.bitbake-devel@lists.openembedded.org>
@ 2011-08-12 18:01 ` Daniel Lazzari
2011-08-12 19:23 ` Joshua Lock
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Lazzari @ 2011-08-12 18:01 UTC (permalink / raw)
To: 'bitbake-devel@lists.openembedded.org'
>-----Original Message-----
>Date: Thu, 11 Aug 2011 16:27:34 -0700
>From: Joshua Lock <josh@linux.intel.com>
>Subject: [bitbake-devel] [RFC] Do postfiles make sense?
>To: bitbake-devel@lists.openembedded.org
>Message-ID: <1313105254.2506.8.camel@vorpal.jf.intel.com>
>Content-Type: text/plain; charset="UTF-8"
>
>All,
>
>Some time ago I added an -R switch to bitbake for configuration files to
>load after bitbake.conf[1].
>
>I'd been happily using this for the UI I've been working on without
>fully realising that it's not safe to rely on postfiles to set variables
>which affect the files included by bitbake.conf. For oe-core this
>includes: BUILD_SYS, TARGET_SYS, MACHINE, SDKMACHINE and DISTRO.
>
>In light of this flaw do postfiles make sense?
>
>For the UI's purpose I think I'm going to have to switch to a prefile
>(-r) in the wrapper script and add logic to hob to detect whether the
>set variables differ from those in hob.local.conf - so that we can warn
>those with a local.conf that uses = assignment that things won't work...
>
>Thoughts? Suggestions?
>
>Thanks,
>Joshua
>
>1.
>http://git.openembedded.org/cgit.cgi/bitbake/commit/?id=a8246ae5400c23df
>0d3ee29c36f4d9f257d1e6d1
>--
>Joshua Lock
> Yocto Project "Johannes Factotum"
> Intel Open Source Technology Centre
>
I actually have a decent use case for a postfile. We have several in house recipes that use an SVN repo for their SRC_URI. The URI contains a variable that points to what branch to build from. So the recipes default to pulling the head revision of trunk. It's nice to be able to have a collection of different conf files that we can post load to override the branch and revision variables without having to change the recipes themselves. So we have like a Release1.1.conf file that when post loaded builds Release 1.1 from the correct branches and revisions. We can do this with -r by using BRANCH ?= "TRUNK" in the recipes (that's how we did it in OE Classic), but when we sometimes forgot the question mark, it would end up building TRUNK no matter what was in the conf file.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Do postfiles make sense?
2011-08-12 18:01 ` [RFC] Do postfiles make sense? Daniel Lazzari
@ 2011-08-12 19:23 ` Joshua Lock
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Lock @ 2011-08-12 19:23 UTC (permalink / raw)
To: bitbake-devel
On Fri, 2011-08-12 at 11:01 -0700, Daniel Lazzari wrote:
> >-----Original Message-----
> >Date: Thu, 11 Aug 2011 16:27:34 -0700
> >From: Joshua Lock <josh@linux.intel.com>
> >Subject: [bitbake-devel] [RFC] Do postfiles make sense?
> >To: bitbake-devel@lists.openembedded.org
> >Message-ID: <1313105254.2506.8.camel@vorpal.jf.intel.com>
> >Content-Type: text/plain; charset="UTF-8"
> >
> >All,
> >
> >Some time ago I added an -R switch to bitbake for configuration files to
> >load after bitbake.conf[1].
> >
> >I'd been happily using this for the UI I've been working on without
> >fully realising that it's not safe to rely on postfiles to set variables
> >which affect the files included by bitbake.conf. For oe-core this
> >includes: BUILD_SYS, TARGET_SYS, MACHINE, SDKMACHINE and DISTRO.
> >
> >In light of this flaw do postfiles make sense?
> >
> >For the UI's purpose I think I'm going to have to switch to a prefile
> >(-r) in the wrapper script and add logic to hob to detect whether the
> >set variables differ from those in hob.local.conf - so that we can warn
> >those with a local.conf that uses = assignment that things won't work...
> >
> >Thoughts? Suggestions?
> >
> >Thanks,
> >Joshua
> >
> >1.
> >http://git.openembedded.org/cgit.cgi/bitbake/commit/?id=a8246ae5400c23df
> >0d3ee29c36f4d9f257d1e6d1
> >--
> >Joshua Lock
> > Yocto Project "Johannes Factotum"
> > Intel Open Source Technology Centre
> >
>
> I actually have a decent use case for a postfile. We have several in
> house recipes that use an SVN repo for their SRC_URI. The URI contains
> a variable that points to what branch to build from. So the recipes
> default to pulling the head revision of trunk. It's nice to be able to
> have a collection of different conf files that we can post load to
> override the branch and revision variables without having to change the
> recipes themselves. So we have like a Release1.1.conf file that when
> post loaded builds Release 1.1 from the correct branches and revisions.
> We can do this with -r by using BRANCH ?= "TRUNK" in the recipes
> (that's how we did it in OE Classic), but when we sometimes forgot the
> question mark, it would end up building TRUNK no matter what was in the
> conf file.
Nice, you've convinced me that the feature should stay.
Thanks for responding,
Joshua
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-12 19:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.15.1313143204.31105.bitbake-devel@lists.openembedded.org>
2011-08-12 18:01 ` [RFC] Do postfiles make sense? Daniel Lazzari
2011-08-12 19:23 ` Joshua Lock
2011-08-11 23:27 Joshua Lock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox