diff options
| -rwxr-xr-x | 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 fc2f7a8c0c..ea885f6325 100755 --- a/scripts/oe-setup-rpmrepo +++ b/scripts/oe-setup-rpmrepo | |||
| @@ -35,19 +35,20 @@ fi | |||
| 35 | 35 | ||
| 36 | setup_tmpdir() { | 36 | setup_tmpdir() { |
| 37 | if [ -z "$TMPDIR" ]; then | 37 | if [ -z "$TMPDIR" ]; then |
| 38 | if [ "x$BUILDDIR" = "x" -o ! -d "$BUILDDIR/tmp" ]; then | 38 | # Try to get TMPDIR from bitbake |
| 39 | # BUILDDIR unset, try and get TMPDIR from bitbake | 39 | type -P bitbake &>/dev/null || { |
| 40 | type -P bitbake &>/dev/null || { | 40 | echo "In order for this script to dynamically infer paths"; |
| 41 | echo "In order for this script to dynamically infer paths"; | 41 | echo "to kernels or filesystem images, you either need"; |
| 42 | echo "to kernels or filesystem images, you either need"; | 42 | echo "bitbake in your PATH or to source oe-init-build-env"; |
| 43 | echo "bitbake in your PATH or to source oe-init-build-env"; | 43 | echo "before running this script" >&2; |
| 44 | echo "before running this script" >&2; | 44 | exit 1; } |
| 45 | exit 1; } | 45 | |
| 46 | 46 | # We have bitbake in PATH, get TMPDIR from bitbake | |
| 47 | # We have bitbake in PATH, get TMPDIR from bitbake | 47 | TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` |
| 48 | TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` | 48 | if [ -z "$TMPDIR" ]; then |
| 49 | else | 49 | echo "Error: this script needs to be run from your build directory," |
| 50 | TMPDIR=$BUILDDIR/tmp | 50 | echo "or you need to explicitly set TMPDIR in your environment" |
| 51 | exit 1 | ||
| 51 | fi | 52 | fi |
| 52 | fi | 53 | fi |
| 53 | } | 54 | } |
