1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 01:40:07 +00:00

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>
This commit is contained in:
Ed Bartosh
2016-04-06 17:46:21 +01:00
committed by Richard Purdie
parent 22fba9b2b7
commit ab18c208b2
2 changed files with 1 additions and 26 deletions
@@ -109,24 +109,6 @@ class BuildEnvironmentController(object):
self.be = be self.be = be
self.connection = None self.connection = None
@staticmethod
def _updateBBLayers(bblayerconf, layerlist):
conflines = open(bblayerconf, "r").readlines()
bblayerconffile = open(bblayerconf, "w")
skip = 0
for i in xrange(len(conflines)):
if skip > 0:
skip =- 1
continue
if conflines[i].startswith("# line added by toaster"):
skip = 1
else:
bblayerconffile.write(conflines[i])
bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"")
bblayerconffile.close()
def setLayers(self, bitbake, ls): def setLayers(self, bitbake, ls):
""" Checks-out bitbake executor and layers from git repositories. """ Checks-out bitbake executor and layers from git repositories.
Sets the layer variables in the config file, after validating local layer paths. Sets the layer variables in the config file, after validating local layer paths.
@@ -180,11 +180,6 @@ class LocalhostBEController(BuildEnvironmentController):
logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist)) logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
# 4. update the bblayers.conf
bblayerconf = os.path.join(self.be.builddir, "conf/bblayers.conf")
if not os.path.exists(bblayerconf):
raise BuildSetupException("BE is not consistent: bblayers.conf file missing at %s" % bblayerconf)
# 5. create custom layer and add custom recipes to it # 5. create custom layer and add custom recipes to it
layerpath = os.path.join(self.be.builddir, layerpath = os.path.join(self.be.builddir,
CustomImageRecipe.LAYER_NAME) CustomImageRecipe.LAYER_NAME)
@@ -247,10 +242,8 @@ class LocalhostBEController(BuildEnvironmentController):
if os.path.isdir(layerpath): if os.path.isdir(layerpath):
layerlist.append(layerpath) layerlist.append(layerpath)
BuildEnvironmentController._updateBBLayers(bblayerconf, layerlist)
self.islayerset = True self.islayerset = True
return True return layerlist
def readServerLogFile(self): def readServerLogFile(self):
return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read() return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()