Hob: Avoid getting TMPDIR in hardcode
authorDongxiao Xu <dongxiao.xu@intel.com>
Sat, 24 Mar 2012 11:44:11 +0000 (19:44 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 25 Mar 2012 11:23:32 +0000 (12:23 +0100)
We should get TMPDIR from bitbake server instead of hardcode.

(Bitbake rev: 91bdd43468448385e07a57ac54ce25db9a8edf03)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/builder.py
bitbake/lib/bb/ui/crumbs/hobeventhandler.py

index 2984490..7b6c116 100755 (executable)
@@ -138,6 +138,7 @@ class Parameters:
         self.runnable_image_types = params["runnable_image_types"].split()
         self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
         self.deployable_image_types = params["deployable_image_types"].split()
+        self.tmpdir = params["tmpdir"]
 
 class Builder(gtk.Window):
 
@@ -813,7 +814,7 @@ class Builder(gtk.Window):
 
         if response == gtk.RESPONSE_YES:
             source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
-            tmp_path = os.path.join(os.getcwd(), "tmp")
+            tmp_path = self.parameters.tmpdir
             if os.path.exists(image_path) and os.path.exists(kernel_path) \
                and os.path.exists(source_env_path) and os.path.exists(tmp_path):
                 cmdline = "/usr/bin/xterm -e "
index e342811..8042fbd 100644 (file)
@@ -439,4 +439,5 @@ class HobHandler(gobject.GObject):
         params["runnable_image_types"] = self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or ""
         params["runnable_machine_patterns"] = self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or ""
         params["deployable_image_types"] = self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or ""
+        params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or ""
         return params