[Toaster] [PATCH 13/25] toaster: implement 'toaster restart-bitbake'

Ed Bartosh ed.bartosh at linux.intel.com
Tue Oct 27 10:28:10 PDT 2015


This implementation allows to have functionality of restarting
bitbake in toaster script. It can be used by toaster script and
build controllers.

[YOCTO #8279]

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 bitbake/bin/toaster | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index b664559..4c4cf0b 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -228,6 +228,15 @@ if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then
     exit 1
 fi
 
+if [ "$1" = 'restart-bitbake' ] ; then
+    stop_bitbake
+    sleep 1
+    start_bitbake
+    rc=$?
+    sleep 1
+    return $rc
+fi
+
 if ! verify_prereq; then
     echo "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2
     return 1
-- 
2.1.4



More information about the toaster mailing list