summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-23 13:13:17 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-25 16:25:05 +0100
commitf159dfb6288d11b51e49a55fddeea1e30a4266b7 (patch)
tree374a4ff0e1b7d4eef86211d54ecee59077c9b8aa /bitbake
parent118da1708c5168a82be0a0724a2db6243eb61ba1 (diff)
downloadpoky-f159dfb6288d11b51e49a55fddeea1e30a4266b7.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] (Bitbake rev: 109e1597671dfb7222672e268190aabc727960ca) 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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 30504e1cf5..44dc4accea 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -88,6 +88,8 @@ class HobHandler(gobject.GObject):
88 deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"]) 88 deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"])
89 self.image_out_dir = os.path.join(deploy_dir, "images") 89 self.image_out_dir = os.path.join(deploy_dir, "images")
90 self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ") 90 self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
91 self.bbpath = self.server.runCommand(["getVariable", "BBPATH"])
92 self.bbfiles = self.server.runCommand(["getVariable", "BBFILES"])
91 93
92 def run_next_command(self): 94 def run_next_command(self):
93 if self.current_command and not self.generating: 95 if self.current_command and not self.generating:
@@ -263,8 +265,7 @@ class HobHandler(gobject.GObject):
263 self.build_queue = targets 265 self.build_queue = targets
264 266
265 if not self.bbpath_ok: 267 if not self.bbpath_ok:
266 bbpath = self.server.runCommand(["getVariable", "BBPATH"]) 268 if self.image_dir in self.bbpath.split(":"):
267 if self.image_dir in bbpath.split(":"):
268 self.bbpath_ok = True 269 self.bbpath_ok = True
269 else: 270 else:
270 nbbp = self.image_dir 271 nbbp = self.image_dir
@@ -272,8 +273,8 @@ class HobHandler(gobject.GObject):
272 if not self.bbfiles_ok: 273 if not self.bbfiles_ok:
273 import re 274 import re
274 pattern = "%s/\*.bb" % self.image_dir 275 pattern = "%s/\*.bb" % self.image_dir
275 bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ") 276
276 for files in bbfiles: 277 for files in self.bbfiles.split(" "):
277 if re.match(pattern, files): 278 if re.match(pattern, files):
278 self.bbfiles_ok = True 279 self.bbfiles_ok = True
279 280