Patchwork [CONSOLIDATED,PULL,51/51] runqemu: take TMPDIR from bitbake

login
register
mail settings
Submitter Saul Wold
Date June 14, 2011, 8:01 a.m.
Message ID <d12c98a8e22959e337c4950121073ec8e0d1dbb7.1308037754.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/5881/
State New, archived
Headers show

Comments

Saul Wold - June 14, 2011, 8:01 a.m.
From: Anders Darander <anders@chargestorm.se>

The old standard of using /home/anders/openembedded-core/build/tmp as TMPDIR do not work any longer,
as - is appended to the real TMPDIR. Thus, always take TMPDIR from
bitbake, unless TMPDIR is set in the environment.

Signed-off-by: Anders Darander <anders@chargestorm.se>
---
 scripts/runqemu |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index a09362c..aa44070 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -262,20 +262,16 @@  SPITZ_DEFAULT_ROOTFS="core-image-sato"
 
 setup_tmpdir() {
     if [ -z "$TMPDIR" ]; then
-        if [ "x$BUILDDIR" = "x" -o ! -d "$BUILDDIR/tmp" ]; then
-            # BUILDDIR unset, try and get TMPDIR from bitbake
-            type -P bitbake &>/dev/null || {
-                echo "In order for this script to dynamically infer paths";
-                echo "to kernels or filesystem images, you either need";
-                echo "bitbake in your PATH or to source oe-init-build-env";
-                echo "before running this script" >&2;
-                exit 1; }
-
-            # We have bitbake in PATH, get TMPDIR from bitbake
-            TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
-        else
-            TMPDIR=$BUILDDIR/tmp
-        fi
+        # BUILDDIR unset, try and get TMPDIR from bitbake
+        type -P bitbake &>/dev/null || {
+            echo "In order for this script to dynamically infer paths";
+            echo "to kernels or filesystem images, you either need";
+            echo "bitbake in your PATH or to source oe-init-build-env";
+            echo "before running this script" >&2;
+            exit 1; }
+
+        # We have bitbake in PATH, get TMPDIR from bitbake
+        TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
     fi
 }