summaryrefslogtreecommitdiff
path: root/scripts/oe-setup-rpmrepo
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-09-28 16:28:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-28 21:37:00 +0100
commit4a23c4dd5ab31d9642e5e49569d5c7ab77e97adf (patch)
tree3f8107b6a8659785b60701cebeeb5638736e3978 /scripts/oe-setup-rpmrepo
parent4e24c10952c7a52af7f2447595fd484692d35534 (diff)
downloadopenembedded-core-4a23c4dd5ab31d9642e5e49569d5c7ab77e97adf.tar.gz
openembedded-core-4a23c4dd5ab31d9642e5e49569d5c7ab77e97adf.tar.bz2
openembedded-core-4a23c4dd5ab31d9642e5e49569d5c7ab77e97adf.tar.xz
openembedded-core-4a23c4dd5ab31d9642e5e49569d5c7ab77e97adf.zip
scripts/oe-setup-rpmrepo: use setup_tmpdir from runqemu
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-setup-rpmrepo')
-rwxr-xr-xscripts/oe-setup-rpmrepo27
1 files changed, 14 insertions, 13 deletions
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index fc2f7a8c0..ea885f632 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
}