Skip to contentSkip to conversation

go: Rely on go-runtime to provide needed modules

PATCH New Khem Raj 1 participant 2 messages Apr 21, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 go: Rely on go-runtime to provide needed modules

go compiler is including go/src/cmd modules in -dev package which is in conflict with go-runtime-dev which provides exact same copy of this module along with other runtime modules, as a result when both go-dev and go-runtime-dev are included in image then it results in rootfs failures, here lets make go depend on go-runtime and dont install the cmd module here explicitly.

---
 meta/recipes-devtools/go/go-target.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/go/go-target.inc +2 -2
index 316bf6f038..8e44247031 100644
@@ -34,12 +34,12 @@ do_install() {
 		install -m 0755 $f ${D}${libdir}/go/bin/
 		ln -sf ../${baselib}/go/bin/$name ${D}${bindir}/
 	done
+	rm -rf ${D}${libdir}/go/src
 }
 
 PACKAGES = "${PN} ${PN}-dev"
 FILES_${PN} = "${libdir}/go/bin ${libdir}/go/pkg/tool/${TARGET_GOTUPLE} ${bindir}"
-FILES_${PN}-dev = "${libdir}/go"
-RDEPENDS_${PN}-dev = "perl bash"
+RDEPENDS_${PN} = "go-runtime"
 INSANE_SKIP_${PN} = "ldflags"
 
 BBCLASSEXTEND = "nativesdk"
Signature · 1 line
2.26.2
author
#1 lore raw

PATCH 2/2 packagegroup-go-sdk-target: Add go to packagegroup

This ensures that we have go compiler installed into image along with runtime

---
 meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb +1 -0
index 86c71900ec..9a52b0781c 100644
@@ -3,6 +3,7 @@ SUMMARY = "Target packages for the Go SDK"
 inherit packagegroup goarch
 
 RDEPENDS_${PN} = " \
+    go \
     go-runtime \
     go-runtime-dev \
     go-runtime-staticdev \
Signature · 1 line
2.26.2