summaryrefslogtreecommitdiffstats
path: root/meta/classes/go.bbclass
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 22:23:02 +0100
commit9c745b6a4c9b61d7f5be49f647e613534fbb57fd (patch)
tree3695b24727d939b60cfee6ee6a2269e07138419f /meta/classes/go.bbclass
parent284b61d386741053522593b3bd2417de6ce54fc1 (diff)
downloadpoky-9c745b6a4c9b61d7f5be49f647e613534fbb57fd.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. (From OE-Core rev: 711b41744ab08ee62c71cdccca335a7828ec0ba1) 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>
Diffstat (limited to 'meta/classes/go.bbclass')
-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/"
68 68
69B = "${WORKDIR}/build" 69B = "${WORKDIR}/build"
70export GOPATH = "${B}" 70export GOPATH = "${B}"
71export GOENV = "off"
71export GOTMPDIR ?= "${WORKDIR}/build-tmp" 72export GOTMPDIR ?= "${WORKDIR}/build-tmp"
72GOTMPDIR[vardepvalue] = "" 73GOTMPDIR[vardepvalue] = ""
73 74