All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] toaster: Point to meta/conf for default toasterconf.json
@ 2015-10-24 21:56 Khem Raj
  2015-10-26 16:05 ` Brian Avery
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2015-10-24 21:56 UTC (permalink / raw)
  To: bitbake-devel

meta-yocto may not exist in nodistro env

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 bin/toaster | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/toaster b/bin/toaster
index 2c3432c..c1a01f0 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -196,7 +196,7 @@ fi
 # in the local layers that currently prevent using an arbitrary
 # toasterconf.json
 if [ "$TOASTER_CONF" = "" ]; then
-    TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json"
+    TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json"
     export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
 fi
 if [ ! -f $TOASTER_CONF ]; then
-- 
2.6.2



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

* Re: [PATCH] toaster: Point to meta/conf for default toasterconf.json
  2015-10-24 21:56 [PATCH] toaster: Point to meta/conf for default toasterconf.json Khem Raj
@ 2015-10-26 16:05 ` Brian Avery
  2015-10-26 16:19   ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Avery @ 2015-10-26 16:05 UTC (permalink / raw)
  To: Khem Raj; +Cc: bitbake-devel

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')")

 fi

-b

On Sat, Oct 24, 2015 at 2:56 PM, Khem Raj <raj.khem@gmail.com> wrote:
> meta-yocto may not exist in nodistro env
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  bin/toaster | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bin/toaster b/bin/toaster
> index 2c3432c..c1a01f0 100755
> --- a/bin/toaster
> +++ b/bin/toaster
> @@ -196,7 +196,7 @@ fi
>  # in the local layers that currently prevent using an arbitrary
>  # toasterconf.json
>  if [ "$TOASTER_CONF" = "" ]; then
> -    TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json"
> +    TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json"
>      export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
>  fi
>  if [ ! -f $TOASTER_CONF ]; then
> --
> 2.6.2
>
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel


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

* Re: [PATCH] toaster: Point to meta/conf for default toasterconf.json
  2015-10-26 16:05 ` Brian Avery
@ 2015-10-26 16:19   ` Khem Raj
  2015-10-27  8:43     ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2015-10-26 16:19 UTC (permalink / raw)
  To: Brian Avery; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 2095 bytes --]


> On Oct 26, 2015, at 9:05 AM, Brian Avery <avery.brian@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

> 
> fi
> 
> -b
> 
> On Sat, Oct 24, 2015 at 2:56 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> meta-yocto may not exist in nodistro env
>> 
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> bin/toaster | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/bin/toaster b/bin/toaster
>> index 2c3432c..c1a01f0 100755
>> --- a/bin/toaster
>> +++ b/bin/toaster
>> @@ -196,7 +196,7 @@ fi
>> # in the local layers that currently prevent using an arbitrary
>> # toasterconf.json
>> if [ "$TOASTER_CONF" = "" ]; then
>> -    TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json"
>> +    TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json"
>>     export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
>> fi
>> if [ ! -f $TOASTER_CONF ]; then
>> --
>> 2.6.2
>> 
>> --
>> _______________________________________________
>> bitbake-devel mailing list
>> bitbake-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/bitbake-devel


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

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

* Re: [PATCH] toaster: Point to meta/conf for default toasterconf.json
  2015-10-26 16:19   ` Khem Raj
@ 2015-10-27  8:43     ` Paul Eggleton
  2015-10-28  0:14       ` Brian Avery
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2015-10-27  8:43 UTC (permalink / raw)
  To: bitbake-devel, Brian Avery

On Monday 26 October 2015 09:19:02 Khem Raj wrote:
> > On Oct 26, 2015, at 9:05 AM, Brian Avery <avery.brian@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


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

* Re: [PATCH] toaster: Point to meta/conf for default toasterconf.json
  2015-10-27  8:43     ` Paul Eggleton
@ 2015-10-28  0:14       ` Brian Avery
  2015-11-05 18:50         ` Brian Avery
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Avery @ 2015-10-28  0:14 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: bitbake-devel

So,

"which is pretty much exactly the wrong thing to have done :/"

is my fault :(, mostly due to my lack of understanding of all the
pieces in play.

Having talked to RP this morning, to get some background, I think
Paul/RP (who had the same idea roughly) is to handle it the same way
we do the local.conf.sample in meta-yocto/conf.

Essentially, we would default to meta/conf/toasterconf.json and use
the TEMPLATECONF (which for yocto hides in poky/.templateconf) to
point the yocto toaster to the meta-yocto/conf/toasterconf.json
version).

Reply if this is ok w/ ya'll as a solution and I'll send a patch doing
that . I'd like to make sure I'm not stubbing anymore toes first,
though.

-b




On Tue, Oct 27, 2015 at 1:43 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> On Monday 26 October 2015 09:19:02 Khem Raj wrote:
>> > On Oct 26, 2015, at 9:05 AM, Brian Avery <avery.brian@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


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

* Re: [PATCH] toaster: Point to meta/conf for default toasterconf.json
  2015-10-28  0:14       ` Brian Avery
@ 2015-11-05 18:50         ` Brian Avery
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Avery @ 2015-11-05 18:50 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: bitbake-devel

Take a look at this please;
https://lists.yoctoproject.org/pipermail/toaster/2015-November/003268.html

This has toaster use the TEMPLATECONF method that oe-setup-builddir does.

-b

On Tue, Oct 27, 2015 at 5:14 PM, Brian Avery <avery.brian@gmail.com> wrote:
> So,
>
> "which is pretty much exactly the wrong thing to have done :/"
>
> is my fault :(, mostly due to my lack of understanding of all the
> pieces in play.
>
> Having talked to RP this morning, to get some background, I think
> Paul/RP (who had the same idea roughly) is to handle it the same way
> we do the local.conf.sample in meta-yocto/conf.
>
> Essentially, we would default to meta/conf/toasterconf.json and use
> the TEMPLATECONF (which for yocto hides in poky/.templateconf) to
> point the yocto toaster to the meta-yocto/conf/toasterconf.json
> version).
>
> Reply if this is ok w/ ya'll as a solution and I'll send a patch doing
> that . I'd like to make sure I'm not stubbing anymore toes first,
> though.
>
> -b
>
>
>
>
> On Tue, Oct 27, 2015 at 1:43 AM, Paul Eggleton
> <paul.eggleton@linux.intel.com> wrote:
>> On Monday 26 October 2015 09:19:02 Khem Raj wrote:
>>> > On Oct 26, 2015, at 9:05 AM, Brian Avery <avery.brian@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


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

end of thread, other threads:[~2015-11-05 18:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-24 21:56 [PATCH] toaster: Point to meta/conf for default toasterconf.json Khem Raj
2015-10-26 16:05 ` Brian Avery
2015-10-26 16:19   ` Khem Raj
2015-10-27  8:43     ` Paul Eggleton
2015-10-28  0:14       ` Brian Avery
2015-11-05 18:50         ` Brian Avery

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.