summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-23 13:13:17 -0700
committerJoshua Lock <josh@linux.intel.com>2011-09-23 13:13:17 -0700
commit109e1597671dfb7222672e268190aabc727960ca (patch)
treec132fa012ce4486e9e0f74cffa6e29103c56e3ba
parent623e9c7f7a9cf12b8c81c26cc608990682a601dd (diff)
downloadbitbake-109e1597671dfb7222672e268190aabc727960ca.tar.gz
ui/crumbs/hobeventhandler: move remaining getVariable calls to init
Instead of calling getVariable commands each time the BBPATH and BBFILES entries need testing cache the results as a member variable at object instantiation. Fixes [YOCTO #1521] Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r--lib/bb/ui/crumbs/hobeventhandler.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 30504e1cf..44dc4acce 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -88,6 +88,8 @@ class HobHandler(gobject.GObject):
deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"])
self.image_out_dir = os.path.join(deploy_dir, "images")
self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
+ self.bbpath = self.server.runCommand(["getVariable", "BBPATH"])
+ self.bbfiles = self.server.runCommand(["getVariable", "BBFILES"])
def run_next_command(self):
if self.current_command and not self.generating:
@@ -263,8 +265,7 @@ class HobHandler(gobject.GObject):
self.build_queue = targets
if not self.bbpath_ok:
- bbpath = self.server.runCommand(["getVariable", "BBPATH"])
- if self.image_dir in bbpath.split(":"):
+ if self.image_dir in self.bbpath.split(":"):
self.bbpath_ok = True
else:
nbbp = self.image_dir
@@ -272,8 +273,8 @@ class HobHandler(gobject.GObject):
if not self.bbfiles_ok:
import re
pattern = "%s/\*.bb" % self.image_dir
- bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
- for files in bbfiles:
+
+ for files in self.bbfiles.split(" "):
if re.match(pattern, files):
self.bbfiles_ok = True