Return-Path: Received: from bird.oak.relay.mailchannels.net (bird.oak.relay.mailchannels.net [23.83.215.17]) by mail.openembedded.org (Postfix) with ESMTP id 945E66E64A for ; Mon, 22 Aug 2016 15:48:23 +0000 (UTC) X-Sender-Id: wwwh|x-authuser|elliot@townx.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 90878100F84; Mon, 22 Aug 2016 15:42:50 +0000 (UTC) Received: from uscentral428.accountservergroup.com (ip-10-220-3-24.us-west-2.compute.internal [10.220.3.24]) by relay.mailchannels.net (Postfix) with ESMTPA id EF3BB1005B4; Mon, 22 Aug 2016 15:42:49 +0000 (UTC) X-Sender-Id: wwwh|x-authuser|elliot@townx.org Received: from uscentral428.accountservergroup.com (uscentral428.accountservergroup.com [10.91.5.35]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.6); Mon, 22 Aug 2016 15:42:50 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|elliot@townx.org X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1471880570384:495722113 X-MC-Ingress-Time: 1471880570384 Received: from [176.249.240.35] (port=48672 helo=localhost.localdomain) by uscentral428.accountservergroup.com with esmtpa (Exim 4.87) (envelope-from ) id 1bbrN6-0002ZA-BL; Mon, 22 Aug 2016 11:42:44 -0400 From: Elliot Smith To: bitbake-devel@lists.openembedded.org Date: Mon, 22 Aug 2016 16:42:32 +0100 Message-Id: <1471880556-9232-5-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471880556-9232-1-git-send-email-elliot.smith@intel.com> References: <1471880556-9232-1-git-send-email-elliot.smith@intel.com> X-AuthUser: elliot@townx.org Subject: [PATCH 5/9] toaster: Fix oe-core fixture X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2016 15:48:26 -0000 From: Michael Wood 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 Signed-off-by: Elliot Smith --- 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