summaryrefslogtreecommitdiffstats
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)
downloadpoky-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):
69 #logger.debug("localhostbecontroller: shellcmd success") 69 #logger.debug("localhostbecontroller: shellcmd success")
70 return out 70 return out
71 71
72 def _createdirpath(self, path):
73 from os.path import dirname as DN
74 if path == "":
75 raise Exception("Invalid path creation specified.")
76 if not os.path.exists(DN(path)):
77 self._createdirpath(DN(path))
78 if not os.path.exists(path):
79 os.mkdir(path, 0755)
80
81 def _setupBE(self): 72 def _setupBE(self):
82 assert self.pokydirname and os.path.exists(self.pokydirname) 73 assert self.pokydirname and os.path.exists(self.pokydirname)
83 self._createdirpath(self.be.builddir) 74 path = self.be.builddir
84 self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir)) 75 if not path:
76 raise Exception("Invalid path creation specified.")
77 if not os.path.exists(path):
78 os.makedirs(path, 0755)
79 self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, path))
85 # delete the templateconf.cfg; it may come from an unsupported layer configuration 80 # delete the templateconf.cfg; it may come from an unsupported layer configuration
86 os.remove(os.path.join(self.be.builddir, "conf/templateconf.cfg")) 81 os.remove(os.path.join(path, "conf/templateconf.cfg"))
87 82
88 83
89 def writeConfFile(self, file_name, variable_list = None, raw = None): 84 def writeConfFile(self, file_name, variable_list = None, raw = None):