From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 21736E00C51; Thu, 12 Nov 2015 04:39:21 -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 * [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 A0279E00C3C for ; Thu, 12 Nov 2015 04:38:50 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 12 Nov 2015 04:38:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,281,1444719600"; d="scan'208";a="818170170" Received: from linux.intel.com ([10.23.219.25]) by orsmga001.jf.intel.com with ESMTP; 12 Nov 2015 04:38:50 -0800 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 9302B6A4083 for ; Thu, 12 Nov 2015 04:37:44 -0800 (PST) From: Ed Bartosh To: toaster@yoctoproject.org Date: Thu, 12 Nov 2015 14:04:45 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 22/26] toaster: set varibales on bitbake server 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:39:21 -0000 Set project variables using connection to bitbake server instead of writing them to toaster configuration files. This is a way to avoid rewriting configuration files before and after every build, triggered by toaster UI. Signed-off-by: Ed Bartosh --- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 9ab741f..b16a1a7 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -292,12 +292,19 @@ class LocalhostBEController(BuildEnvironmentController): def triggerBuild(self, bitbake, layers, variables, targets): # set up the buid environment with the needed layers self.setLayers(bitbake, layers, targets) - self.writeConfFile("conf/toaster-pre.conf", variables) - self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"") # get the bb server running with the build req id and build env id bbctrl = self.getBBController() + # set variables + for var in variables: + bbctrl.setVariable(var.name, var.value) + + # Add 'toaster' and 'buildhistory' to INHERIT variable + inherit = {item.strip() for item in bbctrl.getVariable('INHERIT').split()} + inherit = inherit.union(["toaster", "buildhistory"]) + bbctrl.setVariable('INHERIT', ' '.join(inherit)) + # trigger the build command task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets)) if len(task) == 0: -- 2.1.4