From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: openembedded-core@openembedded.org
Subject: [PATCH 1/6] runqemu: Use OE_TMPDIR
Date: Thu, 3 May 2012 19:12:29 +0200 [thread overview]
Message-ID: <1336065154-8513-1-git-send-email-rep.dot.nop@gmail.com> (raw)
The error message erroneously talked about TMPDIR.
Just use OE_TMPDIR everywhere to make the name of the variable obvious.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
scripts/runqemu | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index caabf61..7c2c4b3 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -55,11 +55,6 @@ SCRIPT_QEMU_OPT=""
SCRIPT_QEMU_EXTRA_OPT=""
SCRIPT_KERNEL_OPT=""
-# Don't use TMPDIR from the external environment, it may be a distro
-# variable pointing to /tmp (e.g. within X on OpenSUSE)
-# Instead, use OE_TMPDIR for passing this in externally.
-TMPDIR="$OE_TMPDIR"
-
# Determine whether the file is a kernel or QEMU image, and set the
# appropriate variables
process_filename() {
@@ -273,8 +268,8 @@ SPITZ_DEFAULT_KERNEL=zImage-spitz.bin
SPITZ_DEFAULT_FSTYPE=ext3
setup_tmpdir() {
- if [ -z "$TMPDIR" ]; then
- # Try to get TMPDIR from bitbake
+ if [ -z "$OE_TMPDIR" ]; then
+ # Try to get OE_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";
@@ -282,11 +277,11 @@ setup_tmpdir() {
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`
- if [ -z "$TMPDIR" ]; then
+ # We have bitbake in PATH, get OE_TMPDIR from bitbake
+ OE_TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
+ if [ -z "$OE_TMPDIR" ]; then
echo "Error: this script needs to be run from your build directory,"
- echo "or you need to explicitly set TMPDIR in your environment"
+ echo "or you need to explicitly set OE_TMPDIR in your environment"
exit 1
fi
fi
@@ -303,7 +298,7 @@ setup_sysroot() {
BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
- OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
+ OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS
fi
}
@@ -348,7 +343,7 @@ fi
if [ -z "$KERNEL" ]; then
setup_tmpdir
eval kernel_file=\$${machine2}_DEFAULT_KERNEL
- KERNEL=$TMPDIR/deploy/images/$kernel_file
+ KERNEL=$OE_TMPDIR/deploy/images/$kernel_file
if [ -z "$KERNEL" ]; then
echo "Error: Unable to determine default kernel for MACHINE [$MACHINE]"
@@ -372,13 +367,13 @@ fi
# core-image-sato
if [ "$LAZY_ROOTFS" = "true" ]; then
setup_tmpdir
- echo "Assuming $ROOTFS really means $TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE"
- ROOTFS=$TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE
+ echo "Assuming $ROOTFS really means $OE_TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE"
+ ROOTFS=$OE_TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE
fi
if [ -z "$ROOTFS" ]; then
setup_tmpdir
- T=$TMPDIR/deploy/images
+ T=$OE_TMPDIR/deploy/images
eval rootfs_list=\$${machine2}_DEFAULT_ROOTFS
findimage $T $MACHINE $FSTYPE
--
1.7.10
next reply other threads:[~2012-05-03 17:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 17:12 Bernhard Reutner-Fischer [this message]
2012-05-03 17:12 ` [PATCH 2/6] runqemu: use modern, single-char name of test(1) Bernhard Reutner-Fischer
2012-05-07 23:25 ` Joshua Lock
2012-05-15 19:59 ` Bernhard Reutner-Fischer
2012-05-15 20:58 ` Khem Raj
2012-05-15 22:03 ` Peter Seebach
2012-05-03 17:12 ` [PATCH 3/6] runqemu: simplify process_filename() Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 4/6] runqemu: add and use error() Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 5/6] runqemu: minor tweaks Bernhard Reutner-Fischer
2012-05-03 17:12 ` [PATCH 6/6] runqemu: be sh neutral Bernhard Reutner-Fischer
2012-05-04 21:18 ` [PATCH 1/6] runqemu: Use OE_TMPDIR Scott Garman
2012-05-07 23:56 ` Scott Garman
2012-05-08 7:07 ` Peter Seebach
2012-05-14 22:34 ` Mark Hatle
2012-05-14 22:40 ` Khem Raj
2012-05-14 22:51 ` Marko Lindqvist
2012-05-14 23:15 ` Mark Hatle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336065154-8513-1-git-send-email-rep.dot.nop@gmail.com \
--to=rep.dot.nop@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=openembedded-core@openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.