All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Reyna <david.reyna@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH 3/9] bitbake: toaster: allow TOASTER_DIR to be overridden from cmdline
Date: Wed, 5 Sep 2018 22:26:42 -0700	[thread overview]
Message-ID: <118fa6779f1e02d804d0a291b3fdf74ff8ba2bb0.1536210899.git.David.Reyna@windriver.com> (raw)
In-Reply-To: <cover.1536210899.git.David.Reyna@windriver.com>

From: Awais Belal <awais_belal@mentor.com>

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 <awais_belal@mentor.com>
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 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=<address:port>] [noweb] [nobuild]
+Usage: source toaster start|stop [webport=<address:port>] [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



  parent reply	other threads:[~2018-09-06  5:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  5:26 [SUMO][PATCH 0/9] toaster: SUMO cummulative patch Aug 28 2018 David Reyna
2018-09-06  5:26 ` [PATCH 1/9] toaster: allow pokydirname to be evaluated when all layers are local David Reyna
2018-09-06  5:26 ` [PATCH 2/9] toaster: use a more flexible way to find bitbake David Reyna
2018-09-06  5:26 ` David Reyna [this message]
2018-09-06  5:26 ` [PATCH 4/9] toaster/widgets.py: avoid divide by zero issues David Reyna
2018-09-06  5:26 ` [PATCH 5/9] toastergui/newproject.html: fix release divs David Reyna
2018-09-06  5:26 ` [PATCH 6/9] toaster/checksettings: allow CUSTOM_XML_ONLY setting through env David Reyna
2018-09-06  5:26 ` [PATCH 7/9] toaster/models.py: allow local paths for custom recipe's base David Reyna
2018-09-06  5:26 ` [PATCH 8/9] toaster/layerdetails.js: don't hide local layer info David Reyna
2018-09-06  5:26 ` [PATCH 9/9] bitbake: toaster: Fix comparison in recipe template David Reyna
2018-09-07 14:35 ` [SUMO][PATCH 0/9] toaster: SUMO cummulative patch Aug 28 2018 akuster808

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=118fa6779f1e02d804d0a291b3fdf74ff8ba2bb0.1536210899.git.David.Reyna@windriver.com \
    --to=david.reyna@windriver.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.