go-cross: allow tmp directory to already exist

The change [go-native: don't use host /var/tmp for temp build artifacts]
fixed builds, but it is possible that the tmp directory already exists, which
results in the following failure:

  | DEBUG: Executing shell function do_compile
  | mkdir: cannot create directory 'tmp/work/x86_64-linux/go-cross/1.6.2-r0/build-tmp': File exists
  | WARNING: exit code 1 from a shell command.
  | ERROR: Function failed: do_compile (log file is located at tmp/work/x86_64-linux/go-cross/1.6.2-r0/temp/log.do_compile.29142)

By adding a -p to the mkdir calls, we can survive this scenario.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Bruce Ashfield 2016-05-25 09:49:53 -04:00
parent da1e90ecc8
commit 313b06bfad
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ do_compile() {
mkdir ${GOBIN}
export TMPDIR=${WORKDIR}/build-tmp
mkdir ${WORKDIR}/build-tmp
mkdir -p ${WORKDIR}/build-tmp
cd src
./make.bash --host-only

View File

@ -13,7 +13,7 @@ do_compile() {
mkdir ${GOBIN}
export TMPDIR=${WORKDIR}/build-tmp
mkdir ${WORKDIR}/build-tmp
mkdir -p ${WORKDIR}/build-tmp
cd src
./make.bash --host-only