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>
This commit is contained in:
Joshua Lock 2011-09-08 17:59:20 -07:00 committed by Richard Purdie
parent 3d09687196
commit 58570ec6a5
1 changed files with 20 additions and 19 deletions

View File

@ -77,6 +77,8 @@ class HobHandler(gobject.GObject):
self.generating = False self.generating = False
self.build_queue = [] self.build_queue = []
self.current_phase = None self.current_phase = None
self.bbpath_ok = False
self.bbfiles_ok = False
self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
self.model = taskmodel self.model = taskmodel
@ -247,6 +249,8 @@ class HobHandler(gobject.GObject):
def build_image(self, image, configurator): def build_image(self, image, configurator):
targets = [] targets = []
nbbp = None
nbbf = None
targets.append(image) targets.append(image)
if self.build_toolchain and self.build_toolchain_headers: if self.build_toolchain and self.build_toolchain_headers:
targets.append("meta-toolchain-sdk") targets.append("meta-toolchain-sdk")
@ -254,31 +258,28 @@ class HobHandler(gobject.GObject):
targets.append("meta-toolchain") targets.append("meta-toolchain")
self.build_queue = targets self.build_queue = targets
bbpath_ok = False if not self.bbpath_ok:
bbpath = self.server.runCommand(["getVariable", "BBPATH"]) bbpath = self.server.runCommand(["getVariable", "BBPATH"])
if self.image_dir in bbpath.split(":"): if self.image_dir in bbpath.split(":"):
bbpath_ok = True self.bbpath_ok = True
else:
nbbp = self.image_dir
bbfiles_ok = False if not self.bbfiles_ok:
bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
for files in bbfiles:
import re import re
pattern = "%s/\*.bb" % self.image_dir pattern = "%s/\*.bb" % self.image_dir
if re.match(pattern, files): bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
bbfiles_ok = True for files in bbfiles:
if re.match(pattern, files):
self.bbfiles_ok = True
if not bbpath_ok: if not self.bbfiles_ok:
nbbp = self.image_dir nbbf = "%s/*.bb" % self.image_dir
else:
nbbp = None
if not bbfiles_ok: if nbbp or nbbf:
nbbf = "%s/*.bb" % self.image_dir
else:
nbbf = None
if not bbfiles_ok or not bbpath_ok:
configurator.insertTempBBPath(nbbp, nbbf) configurator.insertTempBBPath(nbbp, nbbf)
self.bbpath_ok = True
self.bbfiles_ok = True
self.current_command = self.REPARSE_FILES self.current_command = self.REPARSE_FILES
self.run_next_command() self.run_next_command()