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>
This commit is contained in:
parent
41c564fe60
commit
bed552f8d0
|
@ -88,6 +88,8 @@ class HobHandler(gobject.GObject):
|
||||||
deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"])
|
deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"])
|
||||||
self.image_out_dir = os.path.join(deploy_dir, "images")
|
self.image_out_dir = os.path.join(deploy_dir, "images")
|
||||||
self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
|
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):
|
def run_next_command(self):
|
||||||
if self.current_command and not self.generating:
|
if self.current_command and not self.generating:
|
||||||
|
@ -263,8 +265,7 @@ class HobHandler(gobject.GObject):
|
||||||
self.build_queue = targets
|
self.build_queue = targets
|
||||||
|
|
||||||
if not self.bbpath_ok:
|
if not self.bbpath_ok:
|
||||||
bbpath = self.server.runCommand(["getVariable", "BBPATH"])
|
if self.image_dir in self.bbpath.split(":"):
|
||||||
if self.image_dir in bbpath.split(":"):
|
|
||||||
self.bbpath_ok = True
|
self.bbpath_ok = True
|
||||||
else:
|
else:
|
||||||
nbbp = self.image_dir
|
nbbp = self.image_dir
|
||||||
|
@ -272,8 +273,8 @@ class HobHandler(gobject.GObject):
|
||||||
if not self.bbfiles_ok:
|
if not self.bbfiles_ok:
|
||||||
import re
|
import re
|
||||||
pattern = "%s/\*.bb" % self.image_dir
|
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):
|
if re.match(pattern, files):
|
||||||
self.bbfiles_ok = True
|
self.bbfiles_ok = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue