[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core][kirkstone 26/34] go.bbclass: disable the use of the default configuration file
From:       "Steve Sakoman" <steve () sakoman ! com>
Date:       2022-04-29 16:00:45
Message-ID: 00f794aeaaa660851f3a8464ee89c553195dd3dd.1651246310.git.steve () sakoman ! com
[Download RAW message or body]

Content-Transfer-Encoding: 8bit

From: Chen Qi <Qi.Chen@windriver.com>

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>
(cherry picked from commit 711b41744ab08ee62c71cdccca335a7828ec0ba1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/classes/go.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 9c4c92bffd..f3d83febbf 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -67,6 +67,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
 
 B = "${WORKDIR}/build"
 export GOPATH = "${B}"
+export GOENV = "off"
 export GOTMPDIR ?= "${WORKDIR}/build-tmp"
 GOTMPDIR[vardepvalue] = ""
 
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#165045): https://lists.openembedded.org/g/openembedded-core/message/165045
Mute This Topic: https://lists.openembedded.org/mt/90779184/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic