summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2018-08-26 15:33:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-28 10:32:08 +0100
commit525efc3a025d1bf3b9f20cb4342141f2be0b2079 (patch)
treec5e7b7bda0bc881024cce4ef2a36f9d09d5e98ac /bitbake/bin
parentaf52215712098ffe9a167171971f6e7af519c0a1 (diff)
downloadpoky-525efc3a025d1bf3b9f20cb4342141f2be0b2079.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>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/toaster9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index ed365ee82e..9fffbc6ae2 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -18,11 +18,12 @@
18# along with this program. If not, see http://www.gnu.org/licenses/. 18# along with this program. If not, see http://www.gnu.org/licenses/.
19 19
20HELP=" 20HELP="
21Usage: source toaster start|stop [webport=<address:port>] [noweb] [nobuild] 21Usage: source toaster start|stop [webport=<address:port>] [noweb] [nobuild] [toasterdir]
22 Optional arguments: 22 Optional arguments:
23 [nobuild] Setup the environment for capturing builds with toaster but disable managed builds 23 [nobuild] Setup the environment for capturing builds with toaster but disable managed builds
24 [noweb] Setup the environment for capturing builds with toaster but don't start the web server 24 [noweb] Setup the environment for capturing builds with toaster but don't start the web server
25 [webport] Set the development server (default: localhost:8000) 25 [webport] Set the development server (default: localhost:8000)
26 [toasterdir] Set absolute path to be used as TOASTER_DIR (default: BUILDDIR/../)
26" 27"
27 28
28custom_extention() 29custom_extention()
@@ -186,6 +187,7 @@ unset OE_ROOT
186WEBSERVER=1 187WEBSERVER=1
187export TOASTER_BUILDSERVER=1 188export TOASTER_BUILDSERVER=1
188ADDR_PORT="localhost:8000" 189ADDR_PORT="localhost:8000"
190TOASTERDIR=`dirname $BUILDDIR`
189unset CMD 191unset CMD
190for param in $*; do 192for param in $*; do
191 case $param in 193 case $param in
@@ -211,6 +213,9 @@ for param in $*; do
211 ADDR_PORT="localhost:$PORT" 213 ADDR_PORT="localhost:$PORT"
212 fi 214 fi
213 ;; 215 ;;
216 toasterdir=*)
217 TOASTERDIR="${param#*=}"
218 ;;
214 --help) 219 --help)
215 echo "$HELP" 220 echo "$HELP"
216 return 0 221 return 0
@@ -241,7 +246,7 @@ fi
241# 2) the build dir (in build) 246# 2) the build dir (in build)
242# 3) the sqlite db if that is being used. 247# 3) the sqlite db if that is being used.
243# 4) pid's we need to clean up on exit/shutdown 248# 4) pid's we need to clean up on exit/shutdown
244export TOASTER_DIR=`dirname $BUILDDIR` 249export TOASTER_DIR=$TOASTERDIR
245export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR" 250export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR"
246 251
247# Determine the action. If specified by arguments, fine, if not, toggle it 252# Determine the action. If specified by arguments, fine, if not, toggle it