summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-04-06 17:46:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-06 23:10:28 +0100
commitab18c208b205bb5e536f7ed4093bacd071e2d8df (patch)
tree718d3c360bc3970c2e10e415d850a358033140f2 /bitbake/lib/toaster
parent22fba9b2b7982055b54c756cc5bdce05c4a42fdc (diff)
downloadpoky-ab18c208b205bb5e536f7ed4093bacd071e2d8df.tar.gz
bitbake: toaster: modified setLayers API
Removed updating of bblayers.conf. It will be done in runBuild method. Changed return value: return list of layers. Removed _updateBBLayers method. (Bitbake rev: 198bf7e6b8d7f847f2619b71c6bd86a9a76156c9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/bldcontrol/bbcontroller.py18
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py9
2 files changed, 1 insertions, 26 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index 2ca26612d4..058e490fc1 100644
--- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -109,24 +109,6 @@ class BuildEnvironmentController(object):
109 self.be = be 109 self.be = be
110 self.connection = None 110 self.connection = None
111 111
112 @staticmethod
113 def _updateBBLayers(bblayerconf, layerlist):
114 conflines = open(bblayerconf, "r").readlines()
115
116 bblayerconffile = open(bblayerconf, "w")
117 skip = 0
118 for i in xrange(len(conflines)):
119 if skip > 0:
120 skip =- 1
121 continue
122 if conflines[i].startswith("# line added by toaster"):
123 skip = 1
124 else:
125 bblayerconffile.write(conflines[i])
126
127 bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"")
128 bblayerconffile.close()
129
130 def setLayers(self, bitbake, ls): 112 def setLayers(self, bitbake, ls):
131 """ Checks-out bitbake executor and layers from git repositories. 113 """ Checks-out bitbake executor and layers from git repositories.
132 Sets the layer variables in the config file, after validating local layer paths. 114 Sets the layer variables in the config file, after validating local layer paths.
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index e588924639..0a2e41d8c8 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -180,11 +180,6 @@ class LocalhostBEController(BuildEnvironmentController):
180 180
181 logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist)) 181 logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
182 182
183 # 4. update the bblayers.conf
184 bblayerconf = os.path.join(self.be.builddir, "conf/bblayers.conf")
185 if not os.path.exists(bblayerconf):
186 raise BuildSetupException("BE is not consistent: bblayers.conf file missing at %s" % bblayerconf)
187
188 # 5. create custom layer and add custom recipes to it 183 # 5. create custom layer and add custom recipes to it
189 layerpath = os.path.join(self.be.builddir, 184 layerpath = os.path.join(self.be.builddir,
190 CustomImageRecipe.LAYER_NAME) 185 CustomImageRecipe.LAYER_NAME)
@@ -247,10 +242,8 @@ class LocalhostBEController(BuildEnvironmentController):
247 if os.path.isdir(layerpath): 242 if os.path.isdir(layerpath):
248 layerlist.append(layerpath) 243 layerlist.append(layerpath)
249 244
250 BuildEnvironmentController._updateBBLayers(bblayerconf, layerlist)
251
252 self.islayerset = True 245 self.islayerset = True
253 return True 246 return layerlist
254 247
255 def readServerLogFile(self): 248 def readServerLogFile(self):
256 return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read() 249 return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()