diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-09-08 17:59:20 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-13 21:48:34 +0100 |
commit | 58570ec6a57b7e50e72066dc8f459ba9279d1752 (patch) | |
tree | a8be4324fc8b1b5bc4b1e28fda23eae17a04cee1 /bitbake | |
parent | 3d09687196ec8596afad6b04bc5ff7efb594eaa7 (diff) | |
download | poky-58570ec6a57b7e50e72066dc8f459ba9279d1752.tar.gz |
ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build
There's no need to check the BBPATH and BBFILES are set correctly each
build when running multiple builds for one launch of the UI.
Partially addresses [YOCTO #1468]
(Bitbake rev: 39ed18e70e9f3a13b522b4ea02bf6f4bdb7de89c)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 4ed65900cd..8bf599ff64 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -77,6 +77,8 @@ class HobHandler(gobject.GObject): | |||
77 | self.generating = False | 77 | self.generating = False |
78 | self.build_queue = [] | 78 | self.build_queue = [] |
79 | self.current_phase = None | 79 | self.current_phase = None |
80 | self.bbpath_ok = False | ||
81 | self.bbfiles_ok = False | ||
80 | self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') | 82 | self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') |
81 | 83 | ||
82 | self.model = taskmodel | 84 | self.model = taskmodel |
@@ -247,6 +249,8 @@ class HobHandler(gobject.GObject): | |||
247 | 249 | ||
248 | def build_image(self, image, configurator): | 250 | def build_image(self, image, configurator): |
249 | targets = [] | 251 | targets = [] |
252 | nbbp = None | ||
253 | nbbf = None | ||
250 | targets.append(image) | 254 | targets.append(image) |
251 | if self.build_toolchain and self.build_toolchain_headers: | 255 | if self.build_toolchain and self.build_toolchain_headers: |
252 | targets.append("meta-toolchain-sdk") | 256 | targets.append("meta-toolchain-sdk") |
@@ -254,31 +258,28 @@ class HobHandler(gobject.GObject): | |||
254 | targets.append("meta-toolchain") | 258 | targets.append("meta-toolchain") |
255 | self.build_queue = targets | 259 | self.build_queue = targets |
256 | 260 | ||
257 | bbpath_ok = False | 261 | if not self.bbpath_ok: |
258 | bbpath = self.server.runCommand(["getVariable", "BBPATH"]) | 262 | bbpath = self.server.runCommand(["getVariable", "BBPATH"]) |
259 | if self.image_dir in bbpath.split(":"): | 263 | if self.image_dir in bbpath.split(":"): |
260 | bbpath_ok = True | 264 | self.bbpath_ok = True |
265 | else: | ||
266 | nbbp = self.image_dir | ||
261 | 267 | ||
262 | bbfiles_ok = False | 268 | if not self.bbfiles_ok: |
263 | bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ") | ||
264 | for files in bbfiles: | ||
265 | import re | 269 | import re |
266 | pattern = "%s/\*.bb" % self.image_dir | 270 | pattern = "%s/\*.bb" % self.image_dir |
267 | if re.match(pattern, files): | 271 | bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ") |
268 | bbfiles_ok = True | 272 | for files in bbfiles: |
269 | 273 | if re.match(pattern, files): | |
270 | if not bbpath_ok: | 274 | self.bbfiles_ok = True |
271 | nbbp = self.image_dir | ||
272 | else: | ||
273 | nbbp = None | ||
274 | 275 | ||
275 | if not bbfiles_ok: | 276 | if not self.bbfiles_ok: |
276 | nbbf = "%s/*.bb" % self.image_dir | 277 | nbbf = "%s/*.bb" % self.image_dir |
277 | else: | ||
278 | nbbf = None | ||
279 | 278 | ||
280 | if not bbfiles_ok or not bbpath_ok: | 279 | if nbbp or nbbf: |
281 | configurator.insertTempBBPath(nbbp, nbbf) | 280 | configurator.insertTempBBPath(nbbp, nbbf) |
281 | self.bbpath_ok = True | ||
282 | self.bbfiles_ok = True | ||
282 | 283 | ||
283 | self.current_command = self.REPARSE_FILES | 284 | self.current_command = self.REPARSE_FILES |
284 | self.run_next_command() | 285 | self.run_next_command() |