summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian avery <avery.brian@gmail.com>2015-11-20 18:29:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-07 17:37:07 +0000
commitdc6a489c65c067106bafbfcd1d2ba6ee6ecd7b24 (patch)
tree4233cb4eee06cc334d6b66c988b802a3c3b30a5b
parent5a42c2d05048e2742391a7bbc84d5fa7f76c5219 (diff)
downloadpoky-dc6a489c65c067106bafbfcd1d2ba6ee6ecd7b24.tar.gz
bitbake: toaster: change toasterconf.json logic to use TEMPLATECONF, like oe-setup-builddir
This changes the way we pick a toasterconf.json file so that it matches the way oe-setup-builddir does it. We now base it on TEMPLATECONF found in the .templateconf file. (Bitbake rev: 8476db82ea80edf2b70bc2082bcecee09037556d) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/toaster33
1 files changed, 24 insertions, 9 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 71f882e744..abc8737a4d 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -175,6 +175,7 @@ else
175fi 175fi
176 176
177BBBASEDIR=`dirname $TOASTER`/.. 177BBBASEDIR=`dirname $TOASTER`/..
178OEROOT=`dirname $TOASTER`/../..
178 179
179RUNNING=0 180RUNNING=0
180 181
@@ -185,18 +186,33 @@ if [ "$WEB_PORT" = "" ]; then
185 WEB_PORT="8000" 186 WEB_PORT="8000"
186fi 187fi
187# this is the configuraton file we are using for toaster 188# this is the configuraton file we are using for toaster
188# note default is assuming yocto. Override this if you are 189# we are using the same logic that oe-setup-builddir uses
189# running in a pure OE environment and use the toasterconf.json 190# (based on TEMPLATECONF and .templateconf) to determine
190# in meta/conf/toasterconf.json 191# which toasterconf.json to use.
191# note: for future there are a number of relative path assumptions 192# note: There are a number of relative path assumptions
192# in the local layers that currently prevent using an arbitrary 193# in the local layers that currently make using an arbitrary
193# toasterconf.json 194# toasterconf.json difficult.
195
196. $OEROOT/.templateconf
197if [ -n "$TEMPLATECONF" ]; then
198 if [ ! -d "$TEMPLATECONF" ]; then
199 # Allow TEMPLATECONF=meta-xyz/conf as a shortcut
200 if [ -d "$OEROOT/$TEMPLATECONF" ]; then
201 TEMPLATECONF="$OEROOT/$TEMPLATECONF"
202 fi
203 if [ ! -d "$TEMPLATECONF" ]; then
204 echo >&2 "Error: '$TEMPLATECONF' must be a directory containing toasterconf.json"
205 [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1
206 fi
207 fi
208fi
209
194if [ "$TOASTER_CONF" = "" ]; then 210if [ "$TOASTER_CONF" = "" ]; then
195 TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json" 211 TOASTER_CONF="$TEMPLATECONF/toasterconf.json"
196 export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") 212 export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
197fi 213fi
198if [ ! -f $TOASTER_CONF ]; then 214if [ ! -f $TOASTER_CONF ]; then
199 echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" 215 echo "$TOASTER_CONF configuration file not found. Set TOASTER_CONF to specify file or fix .templateconf"
200 [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 216 [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1
201fi 217fi
202# this defines the dir toaster will use for 218# this defines the dir toaster will use for
@@ -324,4 +340,3 @@ case $CMD in
324 echo "Successful ${CMD}." 340 echo "Successful ${CMD}."
325 ;; 341 ;;
326esac 342esac
327