summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristos Gavros <gavrosc@yahoo.com>2025-03-02 18:01:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-03 18:01:30 +0000
commit6864079933fe9720f0a2dbdae7fe4a1b05e7ecf1 (patch)
tree0761cd9b2d8b1cf26fb94ba9d3f4799b29456e38
parent8401052ffdec4ab104be93f4e94cae038d194ab7 (diff)
downloadpoky-6864079933fe9720f0a2dbdae7fe4a1b05e7ecf1.tar.gz
go: Check if GO_IMPORT is set in recipe and error if not
Check if the variable GO_IMPORT is set in the recipe. If not generate an error. Test building go-helloworld when GO_IMPORT assigned Test building go-helloworld when GO_IMPORT is not assigned, generate error about GO_IMPORT Test building any other recipe(e.g bash) when GO_IMPORT is not assigned, generate error about GO_IMPORT Test creating a GO recipe with recipetool (not affected) Test selftest test_recipetool_create_go (not affected) Test selftest test_recipetool_create_go_replace_modules (not affected) [YOCTO #15763] CC: Yoann Congal <yoann.congal@smile.fr> CC: Randy MacLeod <randy.macleod@windriver.com> (From OE-Core rev: 374a91204bdaf44067f6b0ae89ed60934751efaa) Signed-off-by: Christos Gavros <gavrosc@yahoo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/go.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes-recipe/go.bbclass b/meta/classes-recipe/go.bbclass
index c81d946069..e0f667373e 100644
--- a/meta/classes-recipe/go.bbclass
+++ b/meta/classes-recipe/go.bbclass
@@ -7,6 +7,9 @@
7inherit goarch 7inherit goarch
8inherit linuxloader 8inherit linuxloader
9 9
10# if the GO_IMPORT is not set in recipe generate an error
11GO_IMPORT ??= "${@bb.fatal("The recipe needs to set GO_IMPORT for go.bbclass to work")}"
12
10GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}" 13GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
11 14
12export GODEBUG = "gocachehash=1" 15export GODEBUG = "gocachehash=1"