diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-09-20 18:08:28 -0700 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2011-09-20 18:08:28 -0700 |
commit | 043914a8b478fd4a7799acd1b44bdb3b0af2165a (patch) | |
tree | 3cc8b68ed9d11748beb75e064fc27320e3b1a01f | |
parent | d2b9167a7b0eb3fcb31d64f915beef41aac659a5 (diff) | |
download | bitbake-043914a8b478fd4a7799acd1b44bdb3b0af2165a.tar.gz |
hob: fix opening of image output dir on image build completion
Firstly, rather than polling the DEPLOY_DIR_IMAGE directory each time an
image is built store the variable as a member of the hobeventhandler.
Secondly emit the generic "build-complete" signal *after* the specialised
"build-failed" or "build-succeeded" signals such that the appropriate
state variables are set before we try and use them.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r-- | lib/bb/ui/crumbs/hobeventhandler.py | 5 | ||||
-rw-r--r-- | lib/bb/ui/crumbs/runningbuild.py | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py index 393b40707..30504e1cf 100644 --- a/lib/bb/ui/crumbs/hobeventhandler.py +++ b/lib/bb/ui/crumbs/hobeventhandler.py @@ -79,11 +79,14 @@ class HobHandler(gobject.GObject): self.current_phase = None self.bbpath_ok = False self.bbfiles_ok = False + self.build_type = "image" self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') self.model = taskmodel self.server = server + 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(" ") def run_next_command(self): @@ -324,7 +327,7 @@ class HobHandler(gobject.GObject): return self.image_output_types def get_image_deploy_dir(self): - return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) + return self.img_out_dir def make_temp_dir(self): bb.utils.mkdirhier(self.image_dir) diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py index bd0cbf0b1..509590af3 100644 --- a/lib/bb/ui/crumbs/runningbuild.py +++ b/lib/bb/ui/crumbs/runningbuild.py @@ -242,14 +242,14 @@ class RunningBuild (gobject.GObject): Colors.OK, 0)) - # Emit a generic "build-complete" signal for things wishing to - # handle when the build is finished - self.emit("build-complete") # Emit the appropriate signal depending on the number of failures if (failures >= 1): self.emit ("build-failed") else: self.emit ("build-succeeded") + # Emit a generic "build-complete" signal for things wishing to + # handle when the build is finished + self.emit("build-complete") elif isinstance(event, bb.command.CommandFailed): if event.error.startswith("Exited with"): |