From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id EB5BFE00C13; Thu, 12 Nov 2015 04:38:33 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.115 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B652DE00C2D for ; Thu, 12 Nov 2015 04:38:19 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 12 Nov 2015 04:38:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,281,1444719600"; d="scan'208";a="599058616" Received: from linux.intel.com ([10.23.219.25]) by FMSMGA003.fm.intel.com with ESMTP; 12 Nov 2015 04:38:19 -0800 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 41CDB6A4083 for ; Thu, 12 Nov 2015 04:37:14 -0800 (PST) From: Ed Bartosh To: toaster@yoctoproject.org Date: Thu, 12 Nov 2015 14:04:36 +0200 Message-Id: <98fff75111eed37408446fed637833fa8251a258.1447328915.git.ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 13/26] toaster: implement 'toaster restart-bitbake' X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 12:38:34 -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 --- 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