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:
parent
22fba9b2b7
commit
ab18c208b2
|
@ -109,24 +109,6 @@ class BuildEnvironmentController(object):
|
|||
self.be = be
|
||||
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):
|
||||
""" Checks-out bitbake executor and layers from git repositories.
|
||||
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))
|
||||
|
||||
# 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
|
||||
layerpath = os.path.join(self.be.builddir,
|
||||
CustomImageRecipe.LAYER_NAME)
|
||||
|
@ -247,10 +242,8 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
if os.path.isdir(layerpath):
|
||||
layerlist.append(layerpath)
|
||||
|
||||
BuildEnvironmentController._updateBBLayers(bblayerconf, layerlist)
|
||||
|
||||
self.islayerset = True
|
||||
return True
|
||||
return layerlist
|
||||
|
||||
def readServerLogFile(self):
|
||||
return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()
|
||||
|
|
Loading…
Reference in New Issue