From 299e8ff1f7f0888cf630848aa423747fb4f8eedd Mon Sep 17 00:00:00 2001 From: David Reyna Date: Thu, 30 Nov 2017 00:55:28 -0800 Subject: bitbake: toaster: add 'nobuild' option to Toaster Add a 'nobuild' option for starting Toaster without the project and hosted builds support. This allows a Toaster host to provide local build statistics without opening the host to external users building projects. [YOCTO #12315] (Bitbake rev: 2d14d6004b6add5ce07295fff1144ade2e54e1c9) Signed-off-by: David Reyna Signed-off-by: Richard Purdie --- bitbake/bin/toaster | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'bitbake/bin') diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 762451df23..4036f0ad58 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -18,9 +18,10 @@ # along with this program. If not, see http://www.gnu.org/licenses/. HELP=" -Usage: source toaster start|stop [webport=] [noweb] +Usage: source toaster start|stop [webport=] [noweb] [nobuild] Optional arguments: - [noweb] Setup the environment for building with toaster but don't start the development server + [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) " @@ -183,6 +184,7 @@ unset OE_ROOT WEBSERVER=1 +export TOASTER_BUILDSERVER=1 ADDR_PORT="localhost:8000" unset CMD for param in $*; do @@ -190,6 +192,9 @@ for param in $*; do noweb ) WEBSERVER=0 ;; + nobuild ) + TOASTER_BUILDSERVER=0 + ;; start ) CMD=$param ;; @@ -286,9 +291,13 @@ case $CMD in return 4 fi export BITBAKE_UI='toasterui' - $MANAGE runbuilds \ - >${BUILDDIR}/toaster_runbuilds.log 2>&1 \ - & echo $! >${BUILDDIR}/.runbuilds.pid + if [ $TOASTER_BUILDSERVER -eq 1 ] ; then + $MANAGE runbuilds \ + >${BUILDDIR}/toaster_runbuilds.log 2>&1 \ + & echo $! >${BUILDDIR}/.runbuilds.pid + else + echo "Toaster build server not started." + fi # set fail safe stop system on terminal exit trap stop_system SIGHUP -- cgit v1.2.3-54-g00ecf