summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-20 18:08:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-21 14:07:30 +0100
commit863f43a093a40c766f39dada36bb9fdb998bf6f9 (patch)
tree585e59168bcdbad5e9ac3a53925580ccc34d224f /bitbake/lib/bb/ui/crumbs/hobeventhandler.py
parent7dc449595123a5c96d1ac28578b157d4348c9b31 (diff)
downloadpoky-863f43a093a40c766f39dada36bb9fdb998bf6f9.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. (Bitbake rev: 043914a8b478fd4a7799acd1b44bdb3b0af2165a) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 393b40707c..30504e1cf5 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -79,11 +79,14 @@ class HobHandler(gobject.GObject):
79 self.current_phase = None 79 self.current_phase = None
80 self.bbpath_ok = False 80 self.bbpath_ok = False
81 self.bbfiles_ok = False 81 self.bbfiles_ok = False
82 self.build_type = "image"
82 self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') 83 self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
83 84
84 self.model = taskmodel 85 self.model = taskmodel
85 self.server = server 86 self.server = server
86 87
88 deploy_dir = self.server.runCommand(["getVariable", "DEPLOY_DIR"])
89 self.image_out_dir = os.path.join(deploy_dir, "images")
87 self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ") 90 self.image_output_types = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]).split(" ")
88 91
89 def run_next_command(self): 92 def run_next_command(self):
@@ -324,7 +327,7 @@ class HobHandler(gobject.GObject):
324 return self.image_output_types 327 return self.image_output_types
325 328
326 def get_image_deploy_dir(self): 329 def get_image_deploy_dir(self):
327 return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) 330 return self.img_out_dir
328 331
329 def make_temp_dir(self): 332 def make_temp_dir(self):
330 bb.utils.mkdirhier(self.image_dir) 333 bb.utils.mkdirhier(self.image_dir)