From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2] scripts/oe-setup-rpmrepo: use setup_tmpdir from runqemu
Date: Wed, 28 Sep 2011 10:26:09 +0100 [thread overview]
Message-ID: <1ec286b2573498bed6e68bfb913fce101e4e7e6e.1317201529.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1317201529.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1317201529.git.paul.eggleton@linux.intel.com>
Update the internal copy of setup_tmpdir in the oe-setup-rpmrepo script
to be the same as the one in the runqemu script.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/oe-setup-rpmrepo | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index fc2f7a8..ea885f6 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -35,19 +35,20 @@ fi
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
+ # Try to 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`
+ if [ -z "$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"
+ exit 1
fi
fi
}
--
1.7.4.1
next prev parent reply other threads:[~2011-09-28 9:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 9:26 [PATCH 0/2] Fix TMPDIR usage in scripts Paul Eggleton
2011-09-28 9:26 ` [PATCH 1/2] scripts: use OE_TMPDIR instead of TMPDIR external variable Paul Eggleton
2011-09-28 9:26 ` Paul Eggleton [this message]
2011-09-28 11:09 ` [PATCH 0/2] Fix TMPDIR usage in scripts Richard Purdie
2011-09-28 11:25 ` Paul Eggleton
2011-09-28 11:38 ` Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2011-09-28 11:39 [PATCH 0/2] Fix TMPDIR usage in scripts v2 Paul Eggleton
2011-09-28 11:39 ` [PATCH 2/2] scripts/oe-setup-rpmrepo: use setup_tmpdir from runqemu Paul Eggleton
2011-09-28 15:28 [PATCH 0/2] Fix TMPDIR usage in scripts v3 Paul Eggleton
2011-09-28 15:28 ` [PATCH 2/2] scripts/oe-setup-rpmrepo: use setup_tmpdir from runqemu Paul Eggleton
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=1ec286b2573498bed6e68bfb913fce101e4e7e6e.1317201529.git.paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=openembedded-core@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox