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) Fixes [YOCTO #15763]
CC: Yoann Congal <[email protected]> CC: Randy MacLeod <[email protected]> Signed-off-by: Christos Gavros <[email protected]> --- v1->v2 * the shortlog is changed * the commit message is changed * the check of GO_IMPORT is moved in go.bbclass * the logic of checking GO_IMPORT is changed --- meta/classes-recipe/go.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes-recipe/go.bbclass b/meta/classes-recipe/go.bbclass index e3e4782025..23aa3f308a 100644 --- a/meta/classes-recipe/go.bbclass +++ b/meta/classes-recipe/go.bbclass @@ -7,6 +7,9 @@ inherit goarch inherit linuxloader +# if the GO_IMPORT is not set in recipe generate an error +GO_IMPORT ??= "${@bb.fatal("The recipe needs to set GO_IMPORT for go.bbclass to work")}" + GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}" export GODEBUG = "gocachehash=1" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#212195): https://lists.openembedded.org/g/openembedded-core/message/212195 Mute This Topic: https://lists.openembedded.org/mt/111472307/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
