]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
go.bbclass: set GOPROXY
authorJose Quaresma <quaresma.jose@gmail.com>
Thu, 7 Mar 2024 10:06:59 +0000 (02:06 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Mar 2024 08:06:14 +0000 (08:06 +0000)
The GOPROXY is already correctly defined on the native sys root
and this can be checked using the bitbake devshell:

| $ go env GOPROXY
| https://proxy.golang.org,direct

The go_do_compile task calls the compiler directly so the
GOPROXY env is not seen because it's not defined in the shell.
Defining it explicitly solves this problem and was to avoid
setting it in the recipes itself.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/go.bbclass

index 39bfaa515685a72f2d16db7aa586843a9aba4901..cc3564c36a93c3bd00021a77b0f956eca11fcd07 100644 (file)
@@ -78,6 +78,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
 B = "${WORKDIR}/build"
 export GOPATH = "${B}"
 export GOENV = "off"
+export GOPROXY ??= "https://proxy.golang.org,direct"
 export GOTMPDIR ?= "${WORKDIR}/build-tmp"
 GOTMPDIR[vardepvalue] = ""