summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-08-22 16:42:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-02 18:09:50 +0100
commit3b87f2895add3944bffa430e209446defed57afa (patch)
tree61ec896a5586b87cffb374c51d567c5b953112c5 /bitbake
parent50a8d3a34ca89862b41fbe27f87bbe85a772db8b (diff)
downloadpoky-3b87f2895add3944bffa430e209446defed57afa.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py10
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py10
-rw-r--r--bitbake/lib/toaster/orm/fixtures/oe-core.xml16
-rw-r--r--bitbake/lib/toaster/orm/fixtures/poky.xml6
-rw-r--r--bitbake/lib/toaster/orm/fixtures/settings.xml17
5 files changed, 34 insertions, 25 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 283e154530..fbc5ee9d1d 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -98,8 +98,12 @@ class LocalhostBEController(BuildEnvironmentController):
98 # 1. get a list of repos with branches, and map dirpaths for each layer 98 # 1. get a list of repos with branches, and map dirpaths for each layer
99 gitrepos = {} 99 gitrepos = {}
100 100
101 gitrepos[(bitbake.giturl, bitbake.commit)] = [] 101 # if we're using a remotely fetched version of bitbake add its git
102 gitrepos[(bitbake.giturl, bitbake.commit)].append( ("bitbake", bitbake.dirpath) ) 102 # details to the list of repos to clone
103 if bitbake.giturl and bitbake.commit:
104 gitrepos[(bitbake.giturl, bitbake.commit)] = []
105 gitrepos[(bitbake.giturl, bitbake.commit)].append(
106 ("bitbake", bitbake.dirpath))
103 107
104 for layer in layers: 108 for layer in layers:
105 # We don't need to git clone the layer for the CustomImageRecipe 109 # We don't need to git clone the layer for the CustomImageRecipe
@@ -142,8 +146,6 @@ class LocalhostBEController(BuildEnvironmentController):
142 146
143 logger.info("Using pre-checked out source for layer %s", cached_layers) 147 logger.info("Using pre-checked out source for layer %s", cached_layers)
144 148
145
146
147 # 3. checkout the repositories 149 # 3. checkout the repositories
148 for giturl, commit in gitrepos.keys(): 150 for giturl, commit in gitrepos.keys():
149 localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit)) 151 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 0dc55f63af..28b9945e8a 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):
84 print("Loading OE-Core configuration") 84 print("Loading OE-Core configuration")
85 call_command("loaddata", "oe-core") 85 call_command("loaddata", "oe-core")
86 if template_conf: 86 if template_conf:
87 oe_core_path = os.realpath(template_conf + 87 oe_core_path = os.path.realpath(
88 "/../") 88 template_conf +
89 "/../")
89 else: 90 else:
90 print("TEMPLATECONF not found. You may have to" 91 print("TEMPLATECONF not found. You may have to"
91 " manually configure layer paths") 92 " manually configure layer paths")
@@ -94,8 +95,9 @@ class Command(NoArgsCommand):
94 "layer: ") 95 "layer: ")
95 # Update the layer instances of openemebedded-core 96 # Update the layer instances of openemebedded-core
96 for layer in Layer.objects.filter( 97 for layer in Layer.objects.filter(
97 name="openembedded-core"): 98 name="openembedded-core",
98 layer.local_source_dir = oe_core_path 99 local_source_dir="OE-CORE-LAYER-DIR"):
100 layer.local_path = oe_core_path
99 layer.save() 101 layer.save()
100 102
101 # Import the custom fixture if it's present 103 # 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 9572ef6923..d062de57f6 100644
--- a/bitbake/lib/toaster/orm/fixtures/oe-core.xml
+++ b/bitbake/lib/toaster/orm/fixtures/oe-core.xml
@@ -1,17 +1,19 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<django-objects version="1.0"> 2<django-objects version="1.0">
3 <!-- Set the project default value for DISTRO -->
4 <object model="orm.toastersetting" pk="1">
5 <field type="CharField" name="name">DEFCONF_DISTRO</field>
6 <field type="CharField" name="value">nodistro</field>
7 </object>
8
3 <!-- Bitbake versions which correspond to the metadata release --> 9 <!-- Bitbake versions which correspond to the metadata release -->
4 <object model="orm.bitbakeversion" pk="1"> 10 <object model="orm.bitbakeversion" pk="1">
5 <field type="CharField" name="name">master</field> 11 <field type="CharField" name="name">master</field>
6 <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field> 12 <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
7 <field type="CharField" name="branch">master</field> 13 <field type="CharField" name="branch">master</field>
8 <field type="CharField" name="dirpath">bitbake</field>
9 </object> 14 </object>
10 <object model="orm.bitbakeversion" pk="2"> 15 <object model="orm.bitbakeversion" pk="2">
11 <field type="CharField" name="name">HEAD</field> 16 <field type="CharField" name="name">HEAD</field>
12 <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
13 <field type="CharField" name="branch">HEAD</field>
14 <field type="CharField" name="dirpath">bitbake</field>
15 </object> 17 </object>
16 18
17 <!-- Releases available --> 19 <!-- Releases available -->
@@ -43,15 +45,15 @@
43 <!-- TYPE_LOCAL = 0 Layers for the Local release --> 45 <!-- TYPE_LOCAL = 0 Layers for the Local release -->
44 <object model="orm.layer" pk="1"> 46 <object model="orm.layer" pk="1">
45 <field type="CharField" name="name">openembedded-core</field> 47 <field type="CharField" name="name">openembedded-core</field>
46 <field type="CharField" name="layer_index_url"></field>
47 <field type="CharField" name="vcs_url">git://git.openembedded.org/openembedded-core</field> 48 <field type="CharField" name="vcs_url">git://git.openembedded.org/openembedded-core</field>
48 </object> 49 </object>
49 <object model="orm.layer_version" pk="1"> 50 <object model="orm.layer_version" pk="1">
50 <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> 51 <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
51 <field type="IntegerField" name="layer_source">0</field>
52 <field rel="ManyToOneRel" to="orm.release" name="release">2</field> 52 <field rel="ManyToOneRel" to="orm.release" name="release">2</field>
53 <field type="CharField" name="local_path">OE-CORE-LAYER-DIR</field>
53 <field type="CharField" name="branch">HEAD</field> 54 <field type="CharField" name="branch">HEAD</field>
54 <field type="CharField" name="commit">HEAD</field> 55 <field type="CharField" name="dirpath">meta</field>
56 <field type="IntegerField" name="layer_source">0</field>
55 </object> 57 </object>
56 58
57</django-objects> 59</django-objects>
diff --git a/bitbake/lib/toaster/orm/fixtures/poky.xml b/bitbake/lib/toaster/orm/fixtures/poky.xml
index 373e43d81d..75a29168ea 100644
--- a/bitbake/lib/toaster/orm/fixtures/poky.xml
+++ b/bitbake/lib/toaster/orm/fixtures/poky.xml
@@ -1,5 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<django-objects version="1.0"> 2<django-objects version="1.0">
3 <!-- Set the project default value for DISTRO -->
4 <object model="orm.toastersetting" pk="1">
5 <field type="CharField" name="name">DEFCONF_DISTRO</field>
6 <field type="CharField" name="value">poky</field>
7 </object>
8
3 <!-- Bitbake versions which correspond to the metadata release --> 9 <!-- Bitbake versions which correspond to the metadata release -->
4 <object model="orm.bitbakeversion" pk="1"> 10 <object model="orm.bitbakeversion" pk="1">
5 <field type="CharField" name="name">master</field> 11 <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 64a26f517b..78c0fdca7f 100644
--- a/bitbake/lib/toaster/orm/fixtures/settings.xml
+++ b/bitbake/lib/toaster/orm/fixtures/settings.xml
@@ -1,34 +1,31 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<django-objects version="1.0"> 2<django-objects version="1.0">
3 <!-- Default project settings --> 3 <!-- Default project settings -->
4 <object model="orm.toastersetting" pk="1"> 4 <!-- pk=1 is DISTRO -->
5 <object model="orm.toastersetting" pk="2">
5 <field type="CharField" name="name">DEFAULT_RELEASE</field> 6 <field type="CharField" name="name">DEFAULT_RELEASE</field>
6 <field type="CharField" name="value">master</field> 7 <field type="CharField" name="value">master</field>
7 </object> 8 </object>
8 <object model="orm.toastersetting" pk="2"> 9 <object model="orm.toastersetting" pk="3">
9 <field type="CharField" name="name">DEFCONF_PACKAGE_CLASSES</field> 10 <field type="CharField" name="name">DEFCONF_PACKAGE_CLASSES</field>
10 <field type="CharField" name="value">package_rpm</field> 11 <field type="CharField" name="value">package_rpm</field>
11 </object> 12 </object>
12 <object model="orm.toastersetting" pk="3"> 13 <object model="orm.toastersetting" pk="4">
13 <field type="CharField" name="name">DEFCONF_MACHINE</field> 14 <field type="CharField" name="name">DEFCONF_MACHINE</field>
14 <field type="CharField" name="value">qemux86</field> 15 <field type="CharField" name="value">qemux86</field>
15 </object> 16 </object>
16 <object model="orm.toastersetting" pk="4"> 17 <object model="orm.toastersetting" pk="5">
17 <field type="CharField" name="name">DEFCONF_SSTATE_DIR</field> 18 <field type="CharField" name="name">DEFCONF_SSTATE_DIR</field>
18 <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field> 19 <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field>
19 </object> 20 </object>
20 <object model="orm.toastersetting" pk="5"> 21 <object model="orm.toastersetting" pk="6">
21 <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field> 22 <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field>
22 <field type="CharField" name="value"></field> 23 <field type="CharField" name="value"></field>
23 </object> 24 </object>
24 <object model="orm.toastersetting" pk="6"> 25 <object model="orm.toastersetting" pk="7">
25 <field type="CharField" name="name">DEFCONF_IMAGE_FSTYPES</field> 26 <field type="CharField" name="name">DEFCONF_IMAGE_FSTYPES</field>
26 <field type="CharField" name="value">ext3 jffs2 tar.bz2</field> 27 <field type="CharField" name="value">ext3 jffs2 tar.bz2</field>
27 </object> 28 </object>
28 <object model="orm.toastersetting" pk="7">
29 <field type="CharField" name="name">DEFCONF_DISTRO</field>
30 <field type="CharField" name="value">poky</field>
31 </object>
32 <object model="orm.toastersetting" pk="8"> 29 <object model="orm.toastersetting" pk="8">
33 <field type="CharField" name="name">DEFCONF_DL_DIR</field> 30 <field type="CharField" name="name">DEFCONF_DL_DIR</field>
34 <field type="CharField" name="value">${TOPDIR}/../downloads</field> 31 <field type="CharField" name="value">${TOPDIR}/../downloads</field>