[OE-core][PATCH] go.bbclass: don't stage test data with sources of dependencies

From: tperrot <hidden>
Date: 2021-01-08 06:22:59
Subsystem: the rest · Maintainer: Linus Torvalds

From: Thomas Perrot <redacted>

As for the sources the dependencies contain test data, ELF files and other
binaries which aren't necessary for building and which lead to unnecessary QA
warnings.

Signed-off-by: Thomas Perrot <redacted>
---
 meta/classes/go.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 5b26378a4e..fa147892b0 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -116,7 +116,8 @@ go_do_install() {
 	install -d ${D}${libdir}/go/src/${GO_IMPORT}
 	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \
 		tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
-	tar -C ${B} -cf - --exclude-vcs pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
+	tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \
+		tar -C ${D}${libdir}/go --no-same-owner -xf -
 
 	if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
 		install -d ${D}${bindir}
-- 
2.29.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help