aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-08 17:59:20 -0700
committerJoshua Lock <josh@linux.intel.com>2011-09-13 08:30:41 -0700
commit39ed18e70e9f3a13b522b4ea02bf6f4bdb7de89c (patch)
tree1750ecdc33c100e164767c7fe56c17cd523299e4 /lib
parent09f5aed2edb0b8f4a6570e1041b5db66cf2d17cc (diff)
downloadbitbake-39ed18e70e9f3a13b522b4ea02bf6f4bdb7de89c.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] Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/ui/crumbs/hobeventhandler.py39
1 files changed, 20 insertions, 19 deletions
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 4ed65900c..8bf599ff6 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -77,6 +77,8 @@ class HobHandler(gobject.GObject):
self.generating = False
self.build_queue = []
self.current_phase = None
+ self.bbpath_ok = False
+ self.bbfiles_ok = False
self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
self.model = taskmodel
@@ -247,6 +249,8 @@ class HobHandler(gobject.GObject):
def build_image(self, image, configurator):
targets = []
+ nbbp = None
+ nbbf = None
targets.append(image)
if self.build_toolchain and self.build_toolchain_headers:
targets.append("meta-toolchain-sdk")
@@ -254,31 +258,28 @@ class HobHandler(gobject.GObject):
targets.append("meta-toolchain")
self.build_queue = targets
- bbpath_ok = False
- bbpath = self.server.runCommand(["getVariable", "BBPATH"])
- if self.image_dir in bbpath.split(":"):
- bbpath_ok = True
+ if not self.bbpath_ok:
+ bbpath = self.server.runCommand(["getVariable", "BBPATH"])
+ if self.image_dir in bbpath.split(":"):
+ self.bbpath_ok = True
+ else:
+ nbbp = self.image_dir
- bbfiles_ok = False
- bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
- for files in bbfiles:
+ if not self.bbfiles_ok:
import re
pattern = "%s/\*.bb" % self.image_dir
- if re.match(pattern, files):
- bbfiles_ok = True
-
- if not bbpath_ok:
- nbbp = self.image_dir
- else:
- nbbp = None
+ bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
+ for files in bbfiles:
+ if re.match(pattern, files):
+ self.bbfiles_ok = True
- if not bbfiles_ok:
- nbbf = "%s/*.bb" % self.image_dir
- else:
- nbbf = None
+ if not self.bbfiles_ok:
+ nbbf = "%s/*.bb" % self.image_dir
- if not bbfiles_ok or not bbpath_ok:
+ if nbbp or nbbf:
configurator.insertTempBBPath(nbbp, nbbf)
+ self.bbpath_ok = True
+ self.bbfiles_ok = True
self.current_command = self.REPARSE_FILES
self.run_next_command()