[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2144/8267] bitbake: toaster: Fix oe-core fixture
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2144/8267] bitbake: toaster: Fix oe-core fixture
- Date: Sat, 16 Dec 2017 22:49:03 +0000 (UTC)
commit 3b87f2895add3944bffa430e209446defed57afa
Author: Michael Wood <michael g wood intel com>
Date: Mon Aug 22 16:42:32 2016 +0100
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>
.../toaster/bldcontrol/localhostbecontroller.py | 10 ++++++----
.../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 @@
<?xml version="1.0" encoding="utf-8"?>
<django-objects version="1.0">
+ <!-- Set the project default value for DISTRO -->
+ <object model="orm.toastersetting" pk="1">
+ <field type="CharField" name="name">DEFCONF_DISTRO</field>
+ <field type="CharField" name="value">nodistro</field>
+ </object>
+
<!-- Bitbake versions which correspond to the metadata release -->
<object model="orm.bitbakeversion" pk="1">
<field type="CharField" name="name">master</field>
<field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
<field type="CharField" name="branch">master</field>
- <field type="CharField" name="dirpath">bitbake</field>
</object>
<object model="orm.bitbakeversion" pk="2">
<field type="CharField" name="name">HEAD</field>
- <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
- <field type="CharField" name="branch">HEAD</field>
- <field type="CharField" name="dirpath">bitbake</field>
</object>
<!-- Releases available -->
@@ -43,15 +45,15 @@
<!-- TYPE_LOCAL = 0 Layers for the Local release -->
<object model="orm.layer" pk="1">
<field type="CharField" name="name">openembedded-core</field>
- <field type="CharField" name="layer_index_url"></field>
<field type="CharField" name="vcs_url">git://git.openembedded.org/openembedded-core</field>
</object>
<object model="orm.layer_version" pk="1">
<field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
- <field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">2</field>
+ <field type="CharField" name="local_path">OE-CORE-LAYER-DIR</field>
<field type="CharField" name="branch">HEAD</field>
- <field type="CharField" name="commit">HEAD</field>
+ <field type="CharField" name="dirpath">meta</field>
+ <field type="IntegerField" name="layer_source">0</field>
</object>
</django-objects>
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 @@
<?xml version="1.0" encoding="utf-8"?>
<django-objects version="1.0">
+ <!-- Set the project default value for DISTRO -->
+ <object model="orm.toastersetting" pk="1">
+ <field type="CharField" name="name">DEFCONF_DISTRO</field>
+ <field type="CharField" name="value">poky</field>
+ </object>
+
<!-- Bitbake versions which correspond to the metadata release -->
<object model="orm.bitbakeversion" pk="1">
<field type="CharField" name="name">master</field>
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 @@
<?xml version="1.0" encoding="utf-8"?>
<django-objects version="1.0">
<!-- Default project settings -->
- <object model="orm.toastersetting" pk="1">
+ <!-- pk=1 is DISTRO -->
+ <object model="orm.toastersetting" pk="2">
<field type="CharField" name="name">DEFAULT_RELEASE</field>
<field type="CharField" name="value">master</field>
</object>
- <object model="orm.toastersetting" pk="2">
+ <object model="orm.toastersetting" pk="3">
<field type="CharField" name="name">DEFCONF_PACKAGE_CLASSES</field>
<field type="CharField" name="value">package_rpm</field>
</object>
- <object model="orm.toastersetting" pk="3">
+ <object model="orm.toastersetting" pk="4">
<field type="CharField" name="name">DEFCONF_MACHINE</field>
<field type="CharField" name="value">qemux86</field>
</object>
- <object model="orm.toastersetting" pk="4">
+ <object model="orm.toastersetting" pk="5">
<field type="CharField" name="name">DEFCONF_SSTATE_DIR</field>
<field type="CharField" name="value">${TOPDIR}/../sstate-cache</field>
</object>
- <object model="orm.toastersetting" pk="5">
+ <object model="orm.toastersetting" pk="6">
<field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field>
<field type="CharField" name="value"></field>
</object>
- <object model="orm.toastersetting" pk="6">
+ <object model="orm.toastersetting" pk="7">
<field type="CharField" name="name">DEFCONF_IMAGE_FSTYPES</field>
<field type="CharField" name="value">ext3 jffs2 tar.bz2</field>
</object>
- <object model="orm.toastersetting" pk="7">
- <field type="CharField" name="name">DEFCONF_DISTRO</field>
- <field type="CharField" name="value">poky</field>
- </object>
<object model="orm.toastersetting" pk="8">
<field type="CharField" name="name">DEFCONF_DL_DIR</field>
<field type="CharField" name="value">${TOPDIR}/../downloads</field>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]