aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-07-28 15:24:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:29:35 +0100
commit79c8ffa5d3e84ebd0420860e49fb5ee2cdc68406 (patch)
treea74e51dc0054c8fab3b7ebf8991190923b896d4f /bitbake
parent3b6e5df2aa6f0f3db939239091ff00dd16785d24 (diff)
downloadopenembedded-core-contrib-79c8ffa5d3e84ebd0420860e49fb5ee2cdc68406.tar.gz
bitbake: bitbake: toaster: get rid of _createdirpath function
Replaced call of recursive _createdirpath method with simpler call of os.makedirs. (Bitbake rev: 018442e2645390342d43a95a8685e51b29ea868a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 3e16837be1..c0774a3a0b 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -69,21 +69,16 @@ class LocalhostBEController(BuildEnvironmentController):
#logger.debug("localhostbecontroller: shellcmd success")
return out
- def _createdirpath(self, path):
- from os.path import dirname as DN
- if path == "":
- raise Exception("Invalid path creation specified.")
- if not os.path.exists(DN(path)):
- self._createdirpath(DN(path))
- if not os.path.exists(path):
- os.mkdir(path, 0755)
-
def _setupBE(self):
assert self.pokydirname and os.path.exists(self.pokydirname)
- self._createdirpath(self.be.builddir)
- self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir))
+ path = self.be.builddir
+ if not path:
+ raise Exception("Invalid path creation specified.")
+ if not os.path.exists(path):
+ os.makedirs(path, 0755)
+ self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, path))
# delete the templateconf.cfg; it may come from an unsupported layer configuration
- os.remove(os.path.join(self.be.builddir, "conf/templateconf.cfg"))
+ os.remove(os.path.join(path, "conf/templateconf.cfg"))
def writeConfFile(self, file_name, variable_list = None, raw = None):