From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id BC12071C54 for ; Thu, 6 Sep 2018 05:30:08 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id w865U9Zp000081 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 5 Sep 2018 22:30:09 -0700 (PDT) Received: from ala-dreyna-lx3.corp.ad.wrs.com (147.11.157.217) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 5 Sep 2018 22:30:09 -0700 From: David Reyna To: Date: Wed, 5 Sep 2018 22:26:42 -0700 Message-ID: <118fa6779f1e02d804d0a291b3fdf74ff8ba2bb0.1536210899.git.David.Reyna@windriver.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [147.11.157.217] Subject: [PATCH 3/9] bitbake: toaster: allow TOASTER_DIR to be overridden from cmdline X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2018 05:30:08 -0000 Content-Type: text/plain From: Awais Belal TOASTER_DIR is used for higher level toaster artifacts such the SQL DB and creating toaster internal build directories for projects. Prior to this change it was evaluated as `dirname $BUILDDIR` and user had no control over it. This change allows to override this variable from the command line for more flexibility. The variable defaults to its original setting if the optional argument is not passed. [YOCTO #12891] (Bitbake rev: e073775d3b6980fc8004ae28a3ccc3c5bbf50fb2) Signed-off-by: Awais Belal Signed-off-by: David Reyna Signed-off-by: Richard Purdie --- bin/toaster | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/toaster b/bin/toaster index ed365ee..9fffbc6 100755 --- a/bin/toaster +++ b/bin/toaster @@ -18,11 +18,12 @@ # along with this program. If not, see http://www.gnu.org/licenses/. HELP=" -Usage: source toaster start|stop [webport=] [noweb] [nobuild] +Usage: source toaster start|stop [webport=] [noweb] [nobuild] [toasterdir] Optional arguments: [nobuild] Setup the environment for capturing builds with toaster but disable managed builds [noweb] Setup the environment for capturing builds with toaster but don't start the web server [webport] Set the development server (default: localhost:8000) + [toasterdir] Set absolute path to be used as TOASTER_DIR (default: BUILDDIR/../) " custom_extention() @@ -186,6 +187,7 @@ unset OE_ROOT WEBSERVER=1 export TOASTER_BUILDSERVER=1 ADDR_PORT="localhost:8000" +TOASTERDIR=`dirname $BUILDDIR` unset CMD for param in $*; do case $param in @@ -211,6 +213,9 @@ for param in $*; do ADDR_PORT="localhost:$PORT" fi ;; + toasterdir=*) + TOASTERDIR="${param#*=}" + ;; --help) echo "$HELP" return 0 @@ -241,7 +246,7 @@ fi # 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 -export TOASTER_DIR=`dirname $BUILDDIR` +export TOASTER_DIR=$TOASTERDIR export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR" # Determine the action. If specified by arguments, fine, if not, toggle it -- 1.9.1