]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: take TMPDIR from bitbake
authorAnders Darander <anders@chargestorm.se>
Mon, 13 Jun 2011 17:26:16 +0000 (19:26 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Jun 2011 12:23:50 +0000 (13:23 +0100)
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

index a09362c6a1d27e8d40f9e423ec9dcbbb73d8bfb0..aa44070dbe0cd39cd7faeb69d4972b58469d25aa 100755 (executable)
@@ -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
 }