[meta-virtualization] [PATCH] go-native: don't use host /var/tmp for temp build artifacts

Bruce Ashfield bruce.ashfield at gmail.com
Fri May 20 09:34:27 PDT 2016


 merged.

Bruce

On Fri, May 20, 2016 at 10:55 AM, Mark Asselstine <
mark.asselstine at windriver.com> wrote:

> Similar to a recent change for go-cross we can potentially run in to a
> build failure:
>
>   go tool dist: mkdtemp(/var/tmp/go-cbuild-A0rrP5): No such file or
> directory
>
> when the host doesn't have a /var/tmp or when the permissions don't
> allow for the creation of the temporary directory. Instead of relying
> on /var/tmp we create and use a temporary directory in the $WORKDIR to
> work around this issue. This is passed to the build via the TMPDIR
> environment variable.
>
> Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
> ---
>  recipes-devtools/go-cross/go-native.inc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/recipes-devtools/go-cross/go-native.inc
> b/recipes-devtools/go-cross/go-native.inc
> index ae3dc83..e431b48 100644
> --- a/recipes-devtools/go-cross/go-native.inc
> +++ b/recipes-devtools/go-cross/go-native.inc
> @@ -11,6 +11,10 @@ do_compile() {
>      export GOBIN="${B}/bin"
>      rm -rf ${GOBIN}
>      mkdir ${GOBIN}
> +
> +    export TMPDIR=${WORKDIR}/build-tmp
> +    mkdir ${WORKDIR}/build-tmp
> +
>      cd src
>      ./make.bash --host-only
>  }
> --
> 2.1.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20160520/87426ada/attachment.html>


More information about the meta-virtualization mailing list