Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id DDE02E00C86; Thu, 10 Nov 2016 22:16:42 -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=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (sujith.h[at]gmail.com) * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.192.181 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [209.85.192.181 listed in dnsbl.sorbs.net] Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BF4A1E00C75 for ; Thu, 10 Nov 2016 22:16:38 -0800 (PST) Received: by mail-pf0-f181.google.com with SMTP id n85so6389008pfi.1 for ; Thu, 10 Nov 2016 22:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ro6+n08uJTEqDDPP8Fgw9/ZQ7h4MA9bqy6kNyJxz1+Q=; b=shwrgztclk3GUztcbBKaXlvL9eeiddKGz3aX0r2Df2CWOSlwkmfwjbSmJsmGKGJGSW skXrg6NqrMDx5UbVXfdeuMNJbW8wjJfFq/Oib0ADNwxFrT8TKkO65v4fns08fffmhf4l nobUNrqsRhea+Sd/CDn1xqliZYYcPEY30+RutCj7BOfxaeipeeH0hBvAExDdEBqh9R+8 V+1t5hT1cjQL/EwlybLi147fTB2g7CN5MoqPhOhz/QhdQJ2jPCf7zYVabjb57dEfxR9C 2nj5c27YT4V/j+g61Eyc8L62DBXwB/I5Kv8hhkd8hvLbLJuQUictlVQn0HooWr9OkBl3 PZnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ro6+n08uJTEqDDPP8Fgw9/ZQ7h4MA9bqy6kNyJxz1+Q=; b=lR4sRsDLtdgm+Ry1PoxZJPjVNytSu1dM48u799l0a8Vsn1uIq8oCKCgVuk7un6nk+c Ow2dIxGHyR9lwBBeZjVVbKLCtgUZDyn7Kmi6doGkaDPoNX6Tce3AcJh2nnGI3PB+w7F8 /Knl6XP1hSSnnvT27IlIj/zWLyzYNgZslH33opR9SFJBLxzy48OvHJHGoMdYsfsmofsL lEOEziVbS0ylza2R6Vr2brZxishS5JQLwWY2BxUnn/J/ZjT7PMve00nJsb/TA9Mt35Wd BAl4a08NTmXI0Bnu7GCZ0UGS8QeKl/CHBJ0TYLHKROQeLyOjYxfSVsjTp8dSE1vG8nhc jpug== X-Gm-Message-State: ABUngvehr1TF9c7mMzdu0t304lB6+cK51oibFSPrbvHNRRCIWCKUBQjIKomkoqHhVyyf4Q== X-Received: by 10.98.58.132 with SMTP id v4mr3640393pfj.7.1478844998251; Thu, 10 Nov 2016 22:16:38 -0800 (PST) Received: from kdekidd0.inp-wifi.mentorg.com ([139.181.35.34]) by smtp.gmail.com with ESMTPSA id dc3sm11648447pad.32.2016.11.10.22.16.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Nov 2016 22:16:37 -0800 (PST) From: Sujith H To: toaster@yoctoproject.org Date: Fri, 11 Nov 2016 11:46:25 +0530 Message-Id: <1478844986-21199-1-git-send-email-sujith.h@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [PATCH 1/2] toaster: localhostbecontroller accept custom init script for build 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: Fri, 11 Nov 2016 06:16:42 -0000 When passed variable CUSTOM_BUILD_INIT_SCRIPT to toaster setting, it would be nice to use it. Else toaster can use oe-init script. This gives an oppurtunity to use customized build init scritps. Signed-off-by: Sujith H --- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index e5f7c98..3896a82 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -27,7 +27,7 @@ import shutil from django.db import transaction from django.db.models import Q from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake -from orm.models import CustomImageRecipe, Layer, Layer_Version, ProjectLayer +from orm.models import CustomImageRecipe, Layer, Layer_Version, ProjectLayer, ToasterSetting import subprocess from toastermain import settings @@ -277,7 +277,12 @@ class LocalhostBEController(BuildEnvironmentController): builddir = '%s-toaster-%d' % (self.be.builddir, bitbake.req.project.id) oe_init = os.path.join(self.pokydirname, 'oe-init-build-env') # init build environment - self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir), + try: + custom_script = ToasterSetting.objects.get(name="CUSTOM_BUILD_INIT_SCRIPT").value + custom_script = custom_script.replace("%BUILDDIR%" ,builddir) + self._shellcmd("bash -c 'source %s'" % (custom_script)) + except ToasterSetting.DoesNotExist: + self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir), self.be.sourcedir) # update bblayers.conf -- 2.5.0