diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2022-04-26 11:59:09 +0800 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2022-04-29 05:27:54 -1000 |
commit | 00f794aeaaa660851f3a8464ee89c553195dd3dd (patch) | |
tree | 976c39e534bd84e358b83c07e4d3f572a7874577 | |
parent | ec31ce4751e45e98730165d64eb74fc98eab8c85 (diff) | |
download | openembedded-core-contrib-00f794aeaaa660851f3a8464ee89c553195dd3dd.tar.gz |
go.bbclass: disable the use of the default configuration file
We need to disable the use the default configuration file. This is
to ensure that user settings do not mess things up when building go
recipes.
For example, if I set 'GOBIN=./relative/path' in $HOME/.config/go/env,
then go-runtime fails to build with error like below:
cannot install, GOBIN must be an absolute path
According to `go help environment',
"""
Setting GOENV=off in the environment disables the use of the default
configuration file.
"""
We can explicitly disable the configuration file by setting GOENV to off.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 711b41744ab08ee62c71cdccca335a7828ec0ba1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/classes/go.bbclass | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 9c4c92bffd..f3d83febbf 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -67,6 +67,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" B = "${WORKDIR}/build" export GOPATH = "${B}" +export GOENV = "off" export GOTMPDIR ?= "${WORKDIR}/build-tmp" GOTMPDIR[vardepvalue] = "" |