toaster: Point to meta/conf for default toasterconf.json
PATCH 1/1 toaster: Point to meta/conf for default toasterconf.json
meta-yocto may not exist in nodistro env
--- bin/toaster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bin/toaster +1 -1
@@ -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
Signature · 1 line
2.6.2
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
Quoted 28 lines · Khem Raj
meta-yocto may not exist in nodistro env
Signed-off-by Khem Raj <[email protected]>--- bin/toaster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bin/toaster +1
-2@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel
Quoted 27 lines · Brian Avery
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
(quoted diff) +1
-1- 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"(quoted diff) +3
-0+ 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
Quoted 1 line
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
Quoted 34 lines
fi
-b
Quoted 28 lines · Khem Raj
meta-yocto may not exist in nodistro env
Signed-off-by Khem Raj <[email protected]>---
bin/toaster | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)bin/toaster +0
-0@@ -196,7 +196,7 @@ fi # in the local layers that currently prevent using an arbitrary # toasterconf.jsonif [ "$TOASTER_CONF" = "" ]; then
bin/toaster +1
-1- 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
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel
Quoted 28 lines · On Monday 26 October 2015 09:19:02 Khem Raj wrote:
Quoted 28 lines · Brian Avery
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
Quoted 7 lines
Quoted 3 lines
export TOASTER_CONF=$(python -c "import os; printos.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_CONFin 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
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
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
Quoted 56 lines · Paul Eggleton
Quoted 28 lines · On Monday 26 October 2015 09:19:02 Khem Raj wrote:
Quoted 28 lines · Brian Avery
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
Quoted 7 lines
Quoted 3 lines
export TOASTER_CONF=$(python -c "import os; printos.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_CONFin its distro.confThe 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
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
Quoted 83 lines · Brian Avery
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.jsonand use the TEMPLATECONF (which for yocto hides in poky/.templateconf) to point the yocto toaster to themeta-yocto/conf/toasterconf.jsonversion).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
Quoted 56 lines · Paul Eggleton
Quoted 28 lines · On Monday 26 October 2015 09:19:02 Khem Raj wrote:
Quoted 28 lines · Brian Avery
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
Quoted 7 lines
Quoted 3 lines
export TOASTER_CONF=$(python -c "import os; printos.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_CONFin its distro.confThe 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