aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2018-09-05 22:26:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-10 12:14:54 +0100
commit486e571b1caaf7f86f8f969c512566487bcd9841 (patch)
tree54a6b74a4d87b03f883418c1833262246c20f2e7
parent15340edce23e63b060c75114d508e1f76757239c (diff)
downloadbitbake-486e571b1caaf7f86f8f969c512566487bcd9841.tar.gz
bitbake: toaster: allow TOASTER_DIR to be overridden from cmdline
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>
-rwxr-xr-xbin/toaster9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/toaster b/bin/toaster
index ed365ee82..9fffbc6ae 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