From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 18671E00C09; Thu, 12 Nov 2015 04:29:17 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.88 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C85B8E00B5C for ; Thu, 12 Nov 2015 04:29:10 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 12 Nov 2015 04:28:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,281,1444719600"; d="scan'208";a="835499678" Received: from linux.intel.com ([10.23.219.25]) by fmsmga001.fm.intel.com with ESMTP; 12 Nov 2015 04:28:59 -0800 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 113EF6A4083 for ; Thu, 12 Nov 2015 04:27:53 -0800 (PST) From: Ed Bartosh To: toaster@yoctoproject.org Date: Thu, 12 Nov 2015 13:55:20 +0200 Message-Id: <460b7285e8578a5caa7d94e519bd79306cc4f702.1447328915.git.ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 06/26] toaster: check for toaster configuration later X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 12:29:17 -0000 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 --- bitbake/bin/toaster | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index d0a6cb8..3963afd 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -181,30 +181,6 @@ TOASTER_BRBE="" if [ "$WEB_PORT" = "" ]; then WEB_PORT="8000" 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` - NOBROWSER=0 @@ -243,6 +219,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" -- 2.1.4