Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id AC263E00F3E; Mon, 5 Oct 2015 07:54:24 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham 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.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.49 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 Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 31FD1E00C5B for ; Mon, 5 Oct 2015 07:54:21 -0700 (PDT) Received: by pacfv12 with SMTP id fv12so182840500pac.2 for ; Mon, 05 Oct 2015 07:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MoNCf/yiFc3tXAwKfgqRFmMn5ygGUlwMl5lFUfQ/8mQ=; b=0R3ImOFut23bKu2Hy0ksAyeP08CrutTAZRKJ2FGWHyNuasJYYTXc//hN3hV+JROq+3 xRZQJ4iBBqU8QMjct16S4INGmVFBk6jfk7t9mA/li5G0vMYTDJQDRRfBYiwN+Iwk0dMq Xc/rtR6VB0WxCZPX6tZTZ8vDHJfAMeYM4LiB+eKhfhQnZT9QeUYK2f8q7w1YstGYphno sTBS+HA4GyfiQbMjZKX8k1Bwzj0TjnzCY9aJNyTztnEJFIF1OWN9F1HgsDQ+c//G14A7 01NeWVFKaqKeFRQ3/b2fq1/ZPaYThqbg89xbwZcNxOKlnJ4fAqjghcCS18GYTcoZVihY owaA== X-Received: by 10.66.144.135 with SMTP id sm7mr41121004pab.106.1444056861520; Mon, 05 Oct 2015 07:54:21 -0700 (PDT) Received: from kdekidd0.inp-wifi.mentorg.com ([139.181.35.34]) by smtp.gmail.com with ESMTPSA id fb1sm28272509pab.9.2015.10.05.07.54.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Oct 2015 07:54:20 -0700 (PDT) From: Sujith H To: toaster@yoctoproject.org Date: Mon, 5 Oct 2015 20:23:51 +0530 Message-Id: <1444056832-25706-2-git-send-email-sujith.h@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444056832-25706-1-git-send-email-sujith.h@gmail.com> References: <1444056832-25706-1-git-send-email-sujith.h@gmail.com> Subject: [review-request][PATCH 2/3] toaster: Fix the errors thrown during build in toaster_ui.log 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: Mon, 05 Oct 2015 14:54:24 -0000 Lot of errors were thrown during the build, which can be reduced with this patch. The errors were coming from buildinfohelper.py file. Signed-off-by: Sujith H --- bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 9fdde29..5e924ca 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -373,7 +373,7 @@ class ORMWrapper(object): if not localdirname.startswith("/"): localdirname = os.path.join(bc.be.sourcedir, localdirname) #logger.debug(1, "Localdirname %s lcal_path %s" % (localdirname, layer_information['local_path'])) - if localdirname.startswith(layer_information['local_path']): + if localdirname.startswith(layer_information['local_path']) or os.path.exists(layer_information['local_path']): # If the build request came from toaster this field # should contain the information from the layer_version # That created this build request. @@ -383,13 +383,14 @@ class ORMWrapper(object): # we matched the BRLayer, but we need the layer_version that generated this BR; reverse of the Project.schedule_build() #logger.debug(1, "Matched %s to BRlayer %s" % (pformat(layer_information["local_path"]), localdirname)) - for pl in buildrequest.project.projectlayer_set.filter(layercommit__layer__name = brl.name): + for pl in buildrequest.project.projectlayer_set.filter(layercommit__layer__name = layer_information['name']): if pl.layercommit.layer.vcs_url == brl.giturl : layer = pl.layercommit.layer layer.save() return layer - raise NotExisting("Unidentified layer %s" % pformat(layer_information)) + if os.path.exists(localdirname) == False and os.path.exists(layer_information['local_path']) == False: + raise NotExisting("Unidentified layer %s" % pformat(layer_information)) def save_target_file_information(self, build_obj, target_obj, filedata): @@ -813,7 +814,7 @@ class BuildInfoHelper(object): # we get a relative path, unless running in HEAD mode where the path is absolute if not localdirname.startswith("/"): localdirname = os.path.join(bc.be.sourcedir, localdirname) - if path.startswith(localdirname): + if path.startswith(localdirname) or (brl.dirpath in path): # If the build request came from toaster this field # should contain the information from the layer_version # That created this build request. -- 1.9.1