Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 30474E0100C; Thu, 18 Aug 2016 02:42:53 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 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.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.176 listed in list.dnswl.org] Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 7DEFCE01008 for ; Thu, 18 Aug 2016 02:42:33 -0700 (PDT) Received: by mail-pf0-f176.google.com with SMTP id y134so5262260pfg.0 for ; Thu, 18 Aug 2016 02:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AgyekBrEwS/51LrTuRMiolLCrBeO1NhY3TWdhiWs+6A=; b=s7ScvqKjxwSXMvisa5JYMQTjTXEiGBNGPC+RPMql8c4qV016Nil4cEQ93Aw4SJzrXA cmbg2IVwqSlJbEDgdPagKyXNzG0BcgEQ2ruA/jChBs8KgLQOjXs7C6zAOFrOQlI4hh0H S38f2Kg8epMqXOQv7JDS/gMw06m5xaTPzDCDmmiYRqx4xRE3pOkggoX0NOjWxvR0NIlg 13zEWt+aSZsJGFtx7ISCIheTFzEvzJPQefgLFflEVxd7CQMTWTJhZ/VEhmUxi4DVlZCy uRWFqRrzOdW6pZCWsgoSwQwD1DllVC0Ibx5C1HBFHZQq5Hoxm1sLgyYCXwj+U4qsY2mJ Oz1Q== 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:in-reply-to :references; bh=AgyekBrEwS/51LrTuRMiolLCrBeO1NhY3TWdhiWs+6A=; b=Q9k9NOcl9jKyCj+jCxOsq0rzUrysefJo6SVpZq7UhqqZwudslyR44pjjESaA65CDKj idfadsdYlQLyVAqeJ6wh0vVQmfkyE7WPr/eKhomaXG7S42xtLuwZUsScCuRLxvyHBtUb CAPBr88xNnglXpXzKgzMwdR3/i68tk3isvi6sm2WCYjnKZ1fGx6p64W2r40fBsg/2bjO 1NbcjkpGS1lMSqa/akgtBjaMRYmrYXocfRrcJtucTAkaIfPD8IuytotQiXV3e93T0tPl kApZKi78QMehUt5kTbfxAq9U68jm39SVeF2qZI9CWtSnhOM2ZsuwCUMd7aKgM+q/xbTX +IXA== X-Gm-Message-State: AEkoouvc3Q41GeNXP0tMLbdSLpQG/Tw0izRuXgNewwAw8ODowlYwY6iMTQIIW9jBCeit1wrH X-Received: by 10.98.50.2 with SMTP id y2mr2419172pfy.138.1471513352868; Thu, 18 Aug 2016 02:42:32 -0700 (PDT) Received: from orion.ger.corp.intel.com ([192.55.54.44]) by smtp.gmail.com with ESMTPSA id e10sm2517365pay.39.2016.08.18.02.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Aug 2016 02:42:32 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 18 Aug 2016 10:42:14 +0100 Message-Id: <1471513336-13789-6-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471513336-13789-1-git-send-email-michael.g.wood@intel.com> References: <1471513336-13789-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 5/7] toaster: Fix oe-core fixture 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, 18 Aug 2016 09:42:53 -0000 Due to a copy paste error we managed to get some of the wrong information in the oe fixture that provides a suggested default settings for Toaster. This meant it tested correctly when it shouldn't have. Fix: - The use of local bitbake - An incorrect call to realpath which didn't include its parent module. - The field used for the local_dir of an existing openembedded-core Signed-off-by: Michael Wood --- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 10 ++++++---- .../bldcontrol/management/commands/checksettings.py | 10 ++++++---- bitbake/lib/toaster/orm/fixtures/oe-core.xml | 16 +++++++++------- bitbake/lib/toaster/orm/fixtures/poky.xml | 6 ++++++ bitbake/lib/toaster/orm/fixtures/settings.xml | 17 +++++++---------- 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 283e154..fbc5ee9 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -98,8 +98,12 @@ class LocalhostBEController(BuildEnvironmentController): # 1. get a list of repos with branches, and map dirpaths for each layer gitrepos = {} - gitrepos[(bitbake.giturl, bitbake.commit)] = [] - gitrepos[(bitbake.giturl, bitbake.commit)].append( ("bitbake", bitbake.dirpath) ) + # if we're using a remotely fetched version of bitbake add its git + # details to the list of repos to clone + if bitbake.giturl and bitbake.commit: + gitrepos[(bitbake.giturl, bitbake.commit)] = [] + gitrepos[(bitbake.giturl, bitbake.commit)].append( + ("bitbake", bitbake.dirpath)) for layer in layers: # We don't need to git clone the layer for the CustomImageRecipe @@ -142,8 +146,6 @@ class LocalhostBEController(BuildEnvironmentController): logger.info("Using pre-checked out source for layer %s", cached_layers) - - # 3. checkout the repositories for giturl, commit in gitrepos.keys(): localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit)) diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py index 0dc55f6..28b9945 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py @@ -84,8 +84,9 @@ class Command(NoArgsCommand): print("Loading OE-Core configuration") call_command("loaddata", "oe-core") if template_conf: - oe_core_path = os.realpath(template_conf + - "/../") + oe_core_path = os.path.realpath( + template_conf + + "/../") else: print("TEMPLATECONF not found. You may have to" " manually configure layer paths") @@ -94,8 +95,9 @@ class Command(NoArgsCommand): "layer: ") # Update the layer instances of openemebedded-core for layer in Layer.objects.filter( - name="openembedded-core"): - layer.local_source_dir = oe_core_path + name="openembedded-core", + local_source_dir="OE-CORE-LAYER-DIR"): + layer.local_path = oe_core_path layer.save() # Import the custom fixture if it's present diff --git a/bitbake/lib/toaster/orm/fixtures/oe-core.xml b/bitbake/lib/toaster/orm/fixtures/oe-core.xml index 9572ef6..d062de5 100644 --- a/bitbake/lib/toaster/orm/fixtures/oe-core.xml +++ b/bitbake/lib/toaster/orm/fixtures/oe-core.xml @@ -1,17 +1,19 @@ + + + DEFCONF_DISTRO + nodistro + + master git://git.openembedded.org/bitbake master - bitbake HEAD - git://git.openembedded.org/bitbake - HEAD - bitbake @@ -43,15 +45,15 @@ openembedded-core - git://git.openembedded.org/openembedded-core 1 - 0 2 + OE-CORE-LAYER-DIR HEAD - HEAD + meta + 0 diff --git a/bitbake/lib/toaster/orm/fixtures/poky.xml b/bitbake/lib/toaster/orm/fixtures/poky.xml index 373e43d..75a2916 100644 --- a/bitbake/lib/toaster/orm/fixtures/poky.xml +++ b/bitbake/lib/toaster/orm/fixtures/poky.xml @@ -1,5 +1,11 @@ + + + DEFCONF_DISTRO + poky + + master diff --git a/bitbake/lib/toaster/orm/fixtures/settings.xml b/bitbake/lib/toaster/orm/fixtures/settings.xml index 64a26f5..78c0fdc 100644 --- a/bitbake/lib/toaster/orm/fixtures/settings.xml +++ b/bitbake/lib/toaster/orm/fixtures/settings.xml @@ -1,34 +1,31 @@ - + + DEFAULT_RELEASE master - + DEFCONF_PACKAGE_CLASSES package_rpm - + DEFCONF_MACHINE qemux86 - + DEFCONF_SSTATE_DIR ${TOPDIR}/../sstate-cache - + DEFCONF_IMAGE_INSTALL_append - + DEFCONF_IMAGE_FSTYPES ext3 jffs2 tar.bz2 - - DEFCONF_DISTRO - poky - DEFCONF_DL_DIR ${TOPDIR}/../downloads -- 2.7.4