summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-12-02 10:02:38 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-07 17:22:59 +0000
commita4f6809237dffb1abff78c6a8c82bcc4852aedfa (patch)
tree92adeeafd0db37a5534b8c78f4e5ee68d4cc36f3 /bin
parent187c31a8789c37723b9288afd35f1785f1993895 (diff)
downloadopenembedded-core-contrib-a4f6809237dffb1abff78c6a8c82bcc4852aedfa.tar.gz
toaster: check for toaster configuration later
Moved check for toasterconf.json after check of build environment. We'll need some variables from build environment to find toasterconf.json better way. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/toaster25
1 files changed, 24 insertions, 1 deletions
diff --git a/bin/toaster b/bin/toaster
index 1ce4af7030..359b23d6a5 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -222,7 +222,6 @@ fi
# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does.
export TOASTER_DIR=`pwd`
-
NOBROWSER=0
for param in $*; do
@@ -260,6 +259,30 @@ if [ -z "$BUILDDIR" ] || ! which bitbake >/dev/null 2>&1 ; then
return 2
fi
+# this is the configuraton file we are using for toaster
+# note default is assuming yocto. Override this if you are
+# running in a pure OE environment and use the toasterconf.json
+# in meta/conf/toasterconf.json
+# note: for future there are a number of relative path assumptions
+# 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"
+ export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
+fi
+if [ ! -f $TOASTER_CONF ]; then
+ echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path"
+ return 1
+fi
+# this defines the dir toaster will use for
+# 1) clones of layers (in _toaster_clones )
+# 2) the build dir (in build)
+# 3) the sqlite db if that is being used.
+# 4) pid's we need to clean up on exit/shutdown
+# note: for future. in order to make this an arbitrary directory, we need to
+# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does.
+export TOASTER_DIR=`pwd`
+
# Determine the action. If specified by arguments, fine, if not, toggle it
if [ "$1" = 'start' ] || [ "$1" = 'stop' ]; then
CMD="$1"