summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/go-examples
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2021-03-22 11:23:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-23 22:51:25 +0000
commitab6fb347a606276c7ea15ee7fba1b2aab52a97f2 (patch)
tree1712d5f63662fe5d1f6b9eded887d8ffd05168f0 /meta/recipes-extended/go-examples
parent33132ec14676c62167d86cb1efff7c1f5ded107f (diff)
downloadpoky-ab6fb347a606276c7ea15ee7fba1b2aab52a97f2.tar.gz
go-helloworld: disable module-aware mode
>From go 1.16, module-aware mode is enabled by default, regardless of whether a go.mod file is present in the current working directory or a parent directory. Above change makes go-helloworld build fail when doing offline build or proxy.golang.org is not accessible. This fix is kind of workaround, as from go1.17, GOPATH mode will be dropped, and GO111MODULE is ignored. (From OE-Core rev: a0dc36d60809a0a937bbb02ec27ba768ef177063) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/go-examples')
-rw-r--r--meta/recipes-extended/go-examples/go-helloworld_0.1.bb5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-extended/go-examples/go-helloworld_0.1.bb b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
index d3f7525dc9..c51f163e9b 100644
--- a/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
+++ b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
@@ -6,14 +6,15 @@ LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" 6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
7 7
8SRC_URI = "git://${GO_IMPORT}" 8SRC_URI = "git://${GO_IMPORT}"
9SRCREV = "bcf50bfd7dcd8020c90965747d857ae42802e0c5" 9SRCREV = "46695d81d1fae905a270fb7db8a4d11a334562fe"
10UPSTREAM_CHECK_COMMITS = "1" 10UPSTREAM_CHECK_COMMITS = "1"
11 11
12GO_IMPORT = "github.com/golang/example" 12GO_IMPORT = "github.com/golang/example"
13GO_INSTALL = "${GO_IMPORT}/hello" 13GO_INSTALL = "${GO_IMPORT}/hello"
14GO_WORKDIR = "${GO_INSTALL}" 14GO_WORKDIR = "${GO_INSTALL}"
15export GO111MODULE="off"
15 16
16inherit go-mod 17inherit go
17 18
18# This is just to make clear where this example is 19# This is just to make clear where this example is
19do_install_append() { 20do_install_append() {