From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 4A3F0E00B8C; Wed, 23 Mar 2016 03:36:28 -0700 (PDT) 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 * [134.134.136.24 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B0F28E00920 for ; Wed, 23 Mar 2016 03:36:10 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 23 Mar 2016 03:36:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,382,1455004800"; d="scan'208";a="930082554" Received: from linux.intel.com ([10.23.219.25]) by fmsmga001.fm.intel.com with ESMTP; 23 Mar 2016 03:36:09 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 998226A4002 for ; Wed, 23 Mar 2016 04:23:52 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Wed, 23 Mar 2016 10:14:55 +0200 Message-Id: <91ba8105f4cffabfb55d497af75d1b5c5ed21756.1458720709.git.ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH v6 04/41] toasterui: add brbe parameter to buildinfohelper 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: Wed, 23 Mar 2016 10:36:28 -0000 In current toaster code BRBE(build request:build environment) value is passed from toaster to buildinfohelper through the 'SetBRBE' event. Passing it through environment variable is easier as it doesn't involve rpc communication between toaster and bitbake server. It also eliminates the need in running bitbake observer process. Added parameter 'brbe' to BuildInfoHelper.__init__ Used environment variable TOASTER_BRBE to set brbe for buildinfohelper object. Signed-off-by: Ed Bartosh --- bitbake/lib/bb/ui/buildinfohelper.py | 4 ++-- bitbake/lib/bb/ui/toasterui.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 7b8b1a5..c3ffdc8 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -837,7 +837,7 @@ class BuildInfoHelper(object): # pylint: disable=bad-continuation # we do not follow the python conventions for continuation indentation due to long lines here - def __init__(self, server, has_build_history = False): + def __init__(self, server, has_build_history = False, brbe = None): self.internal_state = {} self.internal_state['taskdata'] = {} self.internal_state['targets'] = [] @@ -853,7 +853,7 @@ class BuildInfoHelper(object): # this is set for Toaster-triggered builds by localhostbecontroller # via toasterui - self.brbe = None + self.brbe = brbe self.project = None diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index df85bbd..7d20949 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py @@ -196,7 +196,8 @@ def main(server, eventHandler, params): taskfailures = [] first = True - buildinfohelper = BuildInfoHelper(server, build_history_enabled) + buildinfohelper = BuildInfoHelper(server, build_history_enabled, + os.getenv('TOASTER_BRBE')) # write our own log files into bitbake's log directory; # we're only interested in the path to the parent directory of -- 2.1.4