]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/poky-qemu: Improve tmp layout assumption
authorRichard Purdie <rpurdie@linux.intel.com>
Wed, 15 Dec 2010 23:22:16 +0000 (23:22 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 15 Dec 2010 23:22:16 +0000 (23:22 +0000)
If someone has changed TMPDIR in local.conf to a non-standard location, the
poky-qemu script currently doesn't handle this and assumes if BUILDDIR is set,
$BUILDDIR/tmp will exist.

Its simple to check if this exists and if not, to ask bitbake where the
directory is so this patch changes the code to do that.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
scripts/poky-qemu

index bfeefc70856e721e75956238a78c5612fb70bdba..04349879c523268d4040186c837559724492fc01 100755 (executable)
@@ -216,7 +216,7 @@ SPITZ_DEFAULT_ROOTFS="poky-image-sato"
 
 setup_tmpdir() {
     if [ -z "$TMPDIR" ]; then
-        if [ "x$BUILDDIR" = "x" ]; 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";