[bitbake-devel] [PATCH] toaster: Point to meta/conf for default toasterconf.json

Paul Eggleton paul.eggleton at linux.intel.com
Tue Oct 27 08:43:39 UTC 2015


On Monday 26 October 2015 09:19:02 Khem Raj wrote:
> > On Oct 26, 2015, at 9:05 AM, Brian Avery <avery.brian at gmail.com> wrote:
> > 
> > True,
> > 
> > but then builds for poky would fail :(
> > 
> > How about something like (posted from gmail so just for discussion not
> > to be used!!):
> > 
> > if [ "$TOASTER_CONF" = "" ]; then
> > 
> > -    TOASTER_CONF="$(dirname
> > $TOASTER)/../../meta-yocto/conf/toasterconf.json"
> > 
> > +    if [ -e "$(dirname
> > $TOASTER)/../../meta-yocto/conf/toasterconf.json" ] ; then
> > 
> > +       TOASTER_CONF="$(dirname
> > $TOASTER)/../../meta-yocto/conf/toasterconf.json"
> > 
> > +    elif [ -e "$(dirname $TOASTER)/../../meta/conf/toasterconf.json" ] ;
> > then
> > 
> > +       TOASTER_CONF="$(dirname
> > $TOASTER)/../../meta/conf/toasterconf.json"
> > 
> > +    fi
> > 
> >     export TOASTER_CONF=$(python -c "import os; print
> > 
> > os.path.realpath('$TOASTER_CONF')”)
> 
> I think checking meta-yocto and meta is just doing it for two distro’s
> IMO OE-Core should just default to meta/ and meta-yocto/poky should then
> set TOASTER_CONF in its distro.conf

The original design that I specified was to check every layer in the 
configuration. Somehow what got implemented was to hardcode the path in bitbake 
which is pretty much exactly the wrong thing to have done :/

If we're able to rely on DISTRO being set to the right thing then I'd go with 
Khem's approach, but the important thing to note is that this json file is 
simply initialising the database; changing that path afterwards is going to do 
absolutely nothing. It's more akin to TEMPLATECONF (and possibly even higher 
level than that, since you're likely to create new build directories more 
often than you'll create a new toaster database). Maybe we could use 
TEMPLATECONF?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the bitbake-devel mailing list