Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id DEAF2E01008; Thu, 18 Aug 2016 11:49:33 -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: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.42 listed in list.dnswl.org] * -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 Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 84FA6E00E58 for ; Thu, 18 Aug 2016 11:49:30 -0700 (PDT) Received: by mail-pa0-f42.google.com with SMTP id fi15so8521293pac.1 for ; Thu, 18 Aug 2016 11:49:30 -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=FYUF2JcIvhAMwPhSMuMYgMJ1glw+qCPfeX/sWgQgm24NB9R38mt412ESV4HgY3tCWL mp+7MoglPgj6RFxdw5tPBZLwE0uxnnotv0CKdT5xj1D/5yv54AyEXRmfST9hhBsYF75L e54dgGiP25kZv3z+h27rW3EU+C5teS6UUqnBCL2NRDRYwOsuVLra6Q/YDGSpM+nyipgE iI13ZEHotzOCf93jpzfKAZNo3VrFONbWkD68BoyaXkKEIRyg+whI59Fw2sobwbzl/TKr 6/FfwXKiiMdSGRF84DihWn+7gTMNNCzx3pu7nNkChDiNJAnLcDfZtJRMmiYaV//0VKaN TCtw== 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=j2w3p4cCa0zG2Oh2d16iCH8ejX+fL6a4wv3alkJBH86g2cHJ9u+PdbEAyMkmpBxZZ5 vz0iJHnX8bWwpwQ/EvY7eIjAvmBPzKbxZ8VoFwlXkSZNfJ0jIHZgHOzNLA5BFBjSZUG5 R33Yjzs6BteRz2pQd2rwrgOUaLtLr4D+/7cCWhLQvhu5Sb+e/6cnknbYY90kbe0cYphO HM1lKJEU7n33B9TYVeIPyC2gN/2Kwp0gUgBaIuNrY6YGmyWJAlGJ6U4Vepinu7xFmIys zhZ/sNcTVYLwqwvb7HbQVMCo43ATUiKoxTb8DEtlJiIWxCSOgp47Vu9+6khTWBuugceL eo8A== X-Gm-Message-State: AEkoouvZjQMhDWvsNPmYwMXgcD0hCoFCyG9J4thwimv1eITj9EGMIAb+/il2DoL2Im/I5N+T X-Received: by 10.66.185.14 with SMTP id ey14mr6665706pac.71.1471546169652; Thu, 18 Aug 2016 11:49:29 -0700 (PDT) Received: from orion.ger.corp.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id w64sm496095pfb.93.2016.08.18.11.49.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Aug 2016 11:49:29 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 18 Aug 2016 19:49:10 +0100 Message-Id: <1471546154-20891-6-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471546154-20891-1-git-send-email-michael.g.wood@intel.com> References: <1471546154-20891-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH v2 5/9] 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 18:49:33 -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