Skip to contentSkip to conversation

go-helloworld: remove unused GO_WORKDIR

PATCH In review Chen Qi 2 participants 2 messages Apr 29, 2022

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 go-helloworld: remove unused GO_WORKDIR

The GO_WORKDIR is used only in go-mod.bbclass. As this recipe does not inherit go-mod.bbclass, this variable is useless here.

This go-helloworld recipe was made to inherit go-mod.bbclass and build in module-aware mode. However, it was found that we need to build go recipes in GOPATH mode in order to support offline build. As a result, this recipe was changed back to only inherit go.bbclass. But the GO_WORKDIR setting was not cleaned up.

---
 meta/recipes-extended/go-examples/go-helloworld_0.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/go-examples/go-helloworld_0.1.bb +1 -1
index 0faab39b66..d0de035921 100644
@@ -11,7 +11,7 @@ UPSTREAM_CHECK_COMMITS = "1"
 
 GO_IMPORT = "golang.org/x/example"
 GO_INSTALL = "${GO_IMPORT}/hello"
-GO_WORKDIR = "${GO_INSTALL}"
+
 export GO111MODULE="off"
 
 inherit go
Signature · 1 line
2.17.1
#1 lore raw

lgtm, thanks for fixing it

Quoted 40 lines · Chen Qi

The GO_WORKDIR is used only in go-mod.bbclass. As this recipe does not inherit go-mod.bbclass, this variable is useless here.

This go-helloworld recipe was made to inherit go-mod.bbclass and build in module-aware mode. However, it was found that we need to build go recipes in GOPATH mode in order to support offline build. As a result, this recipe was changed back to only inherit go.bbclass. But the GO_WORKDIR setting was not cleaned up.

---
 meta/recipes-extended/go-examples/go-helloworld_0.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/go-examples/go-helloworld_0.1.bb +1 -2
index 0faab39b66..d0de035921 100644
@@ -11,7 +11,7 @@ UPSTREAM_CHECK_COMMITS = "1"
 
 GO_IMPORT = "golang.org/x/example"
 GO_INSTALL = "${GO_IMPORT}/hello"
-GO_WORKDIR = "${GO_INSTALL}"
+
 export GO111MODULE="off"
 
 inherit go
--

2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164986): https://lists.openembedded.org/g/openembedded-core/message/164986
Mute This Topic: https://lists.openembedded.org/mt/90768475/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-