diff options
| author | Anders Darander <anders@chargestorm.se> | 2011-06-13 19:26:16 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-14 15:28:25 +0100 |
| commit | 81d14f5629b4eeb2096ccb52812e5775fe0125e9 (patch) | |
| tree | d8595be45f4d9628af5d1007dddc81eafe426d52 /scripts/runqemu | |
| parent | 10fc86d8495a0fa1da570d7858c714d4dbc1ed26 (diff) | |
| download | poky-81d14f5629b4eeb2096ccb52812e5775fe0125e9.tar.gz | |
runqemu: take TMPDIR from bitbake
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.
(From OE-Core rev: 993672fa2739794a6dd0dbd7bb232fa60522b897)
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
| -rwxr-xr-x | scripts/runqemu | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index a09362c6a1..aa44070dbe 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -262,20 +262,16 @@ SPITZ_DEFAULT_ROOTFS="core-image-sato" | |||
| 262 | 262 | ||
| 263 | setup_tmpdir() { | 263 | setup_tmpdir() { |
| 264 | if [ -z "$TMPDIR" ]; then | 264 | if [ -z "$TMPDIR" ]; then |
| 265 | if [ "x$BUILDDIR" = "x" -o ! -d "$BUILDDIR/tmp" ]; then | 265 | # BUILDDIR unset, try and get TMPDIR from bitbake |
| 266 | # BUILDDIR unset, try and get TMPDIR from bitbake | 266 | type -P bitbake &>/dev/null || { |
| 267 | type -P bitbake &>/dev/null || { | 267 | echo "In order for this script to dynamically infer paths"; |
| 268 | echo "In order for this script to dynamically infer paths"; | 268 | echo "to kernels or filesystem images, you either need"; |
| 269 | echo "to kernels or filesystem images, you either need"; | 269 | echo "bitbake in your PATH or to source oe-init-build-env"; |
| 270 | echo "bitbake in your PATH or to source oe-init-build-env"; | 270 | echo "before running this script" >&2; |
| 271 | echo "before running this script" >&2; | 271 | exit 1; } |
| 272 | exit 1; } | 272 | |
| 273 | 273 | # We have bitbake in PATH, get TMPDIR from bitbake | |
| 274 | # We have bitbake in PATH, get TMPDIR from bitbake | 274 | TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` |
| 275 | TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` | ||
| 276 | else | ||
| 277 | TMPDIR=$BUILDDIR/tmp | ||
| 278 | fi | ||
| 279 | fi | 275 | fi |
| 280 | } | 276 | } |
| 281 | 277 | ||
