]> code.ossystems Code Review - openembedded-core.git/commitdiff
go-helloworld: disable module-aware mode
authorChangqing Li <changqing.li@windriver.com>
Mon, 22 Mar 2021 03:23:30 +0000 (11:23 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Mar 2021 22:51:20 +0000 (22:51 +0000)
>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.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/go-examples/go-helloworld_0.1.bb

index d3f7525dc9840511d9027d074ec827489bab2a2e..c51f163e9b554beb381796e4df22aec2b4c50521 100644 (file)
@@ -6,14 +6,15 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
 SRC_URI = "git://${GO_IMPORT}"
-SRCREV = "bcf50bfd7dcd8020c90965747d857ae42802e0c5"
+SRCREV = "46695d81d1fae905a270fb7db8a4d11a334562fe"
 UPSTREAM_CHECK_COMMITS = "1"
 
 GO_IMPORT = "github.com/golang/example"
 GO_INSTALL = "${GO_IMPORT}/hello"
 GO_WORKDIR = "${GO_INSTALL}"
+export GO111MODULE="off"
 
-inherit go-mod
+inherit go
 
 # This is just to make clear where this example is
 do_install_append() {