1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

bitbake: toaster: Fix oe-core fixture

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

(Bitbake rev: d57a9124650e5367919668dfccf6aad4962a77f1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood
2016-08-22 16:42:32 +01:00
committed by Richard Purdie
parent 50a8d3a34c
commit 3b87f2895a
5 changed files with 34 additions and 25 deletions
@@ -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))
@@ -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