Bug 15763

Summary: GO_IMPORT missing sanity check
Product: [Build System, Metadata & Runtime] OE-Core Reporter: kweihmann
Component: coreAssignee: Christos Gavros <gavrosc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: gavrosc, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description kweihmann 2025-02-16 11:15:16 UTC
GO_IMPORT referenced by at least go-mod and go class, doesn't come with any default value.
There's also no sanity check in case the currently undefined variable is not set at all
Comment 1 Richard Purdie 2025-02-17 12:51:19 UTC
As per several other bugs opened of this type, we are not adding default values for the sake of it.

For the sanity check, a patch would be welcome.
Comment 2 Christos Gavros 2025-02-25 14:28:51 UTC
hi Richard

I can send a patch for sanity check for this. Couple of questions:

- in case sanity check fails, shall we generate a warning or abort building?
- shall we check in every build ? 

Br
Christos
Comment 3 Randy MacLeod 2025-02-25 15:24:33 UTC
Christos,

Richard may not reply so I will.

Start with making it an error and send the patch to get feedback.

Do any go-based recipes currently not set this variable?
Comment 4 Christos Gavros 2025-02-25 15:31:29 UTC
Hi Randy

I am not in a hurry :)!

Its assigned only in go-helloworld_0.1.bb as an example as far as I can see!

That's why I asked if we make it only warning!

I will do as you said!

Br
Christos
Comment 5 Christos Gavros 2025-02-25 18:12:47 UTC
hi

I send a patch! Testing with poky is generating error and aborting the build.
If I assign a value in local.conf then is ok.

https://lists.openembedded.org/g/openembedded-core/topic/patch_sanity_check/111381998
Comment 6 Christos Gavros 2025-03-04 12:41:10 UTC
The patch is merged in the master:

https://git.openembedded.org/openembedded-core/commit/?id=374a91204bdaf44067f6b0ae89ed60934751efaa
Comment 7 kweihmann 2025-03-04 12:47:41 UTC
@Christos Gavros - very nice solution - really like it - thanks for the patch