[poky] [PATCH 3/3] scripts/poky-qemu: Improve tmp layout assumption

Richard Purdie rpurdie at linux.intel.com
Thu Jan 13 10:58:13 PST 2011


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 at linux.intel.com>
---
 scripts/poky-qemu |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index 67af439..19305e2 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -204,7 +204,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";
-- 
1.7.3.4




More information about the poky mailing list