summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-04-26 11:59:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-26 18:29:04 +0100
commit711b41744ab08ee62c71cdccca335a7828ec0ba1 (patch)
tree57e240fce92d7a0c829c1f0302eae598ad04a8a5
parent1c02b768a71ec88bfe1cc0c4443683de8b66056e (diff)
downloadopenembedded-core-711b41744ab08ee62c71cdccca335a7828ec0ba1.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>
-rw-r--r--meta/classes/go.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index df8d4db26d..1a9a0bc1d4 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -68,6 +68,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
B = "${WORKDIR}/build"
export GOPATH = "${B}"
+export GOENV = "off"
export GOTMPDIR ?= "${WORKDIR}/build-tmp"
GOTMPDIR[vardepvalue] = ""