diff options
author | Awais Belal <awais_belal@mentor.com> | 2018-08-26 15:33:26 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-28 10:32:08 +0100 |
commit | 525efc3a025d1bf3b9f20cb4342141f2be0b2079 (patch) | |
tree | c5e7b7bda0bc881024cce4ef2a36f9d09d5e98ac | |
parent | af52215712098ffe9a167171971f6e7af519c0a1 (diff) | |
download | poky-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>
-rwxr-xr-x | bitbake/bin/toaster | 9 |
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 | ||
20 | HELP=" | 20 | HELP=" |
21 | Usage: source toaster start|stop [webport=<address:port>] [noweb] [nobuild] | 21 | Usage: 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 | ||
28 | custom_extention() | 29 | custom_extention() |
@@ -186,6 +187,7 @@ unset OE_ROOT | |||
186 | WEBSERVER=1 | 187 | WEBSERVER=1 |
187 | export TOASTER_BUILDSERVER=1 | 188 | export TOASTER_BUILDSERVER=1 |
188 | ADDR_PORT="localhost:8000" | 189 | ADDR_PORT="localhost:8000" |
190 | TOASTERDIR=`dirname $BUILDDIR` | ||
189 | unset CMD | 191 | unset CMD |
190 | for param in $*; do | 192 | for 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 |
244 | export TOASTER_DIR=`dirname $BUILDDIR` | 249 | export TOASTER_DIR=$TOASTERDIR |
245 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR" | 250 | export 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 |