]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: implement 'toaster restart-bitbake'
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 2 Dec 2015 18:02:45 +0000 (10:02 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Dec 2015 17:22:59 +0000 (17:22 +0000)
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@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/toaster

index 34a4e8f6f779aa2ea64458fb930b7efdfaeafe91..c89e01570653bac983bb5bcb8e07a0391026401a 100755 (executable)
@@ -268,6 +268,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