Bug 13883 - The use of `go mod` inside OE-Core is broken
Summary: The use of `go mod` inside OE-Core is broken
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 3.1
Hardware: x86 Multiple
: Medium+ major
Target Milestone: 3.2 M1
Assignee: Khem Raj
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-04-27 12:55 UTC by Otavio Salvador
Modified: 2020-05-21 19:24 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: Yes (doc changes required)


Attachments
telegraf_1.14.2.bb (2.72 KB, application/octet-stream)
2020-05-12 08:53 UTC, Matt Madison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Otavio Salvador 2020-04-27 12:55:26 UTC
We had a customer which asked the packaging of telegraf however, we got nowhere. The `go mod` support is starting to become the standard however it does not work at all on OE-Core.

I am not used to `go mod` but would be keen to help if someone knows well how to do the proper integration.
Comment 1 Matt Madison 2020-05-12 08:53:19 UTC
Created attachment 4673 [details]
telegraf_1.14.2.bb

See comments in the recipe for how I made go module support work.
Comment 2 Matt Madison 2020-05-12 09:00:08 UTC
I had a couple of hours to look at this, and while I got telegraf to build OK, I'm less certain about how to generalize the changes I made to work for any package that uses go modules.

I don't have time to look into this any further, but hopefully the above recipe will help point someone in the right direction.
Comment 3 Otavio Salvador 2020-05-21 19:24:54 UTC
I sent the patches fixing this. I made a class which makes it easier to get it right and cleaned it a lot.

Matt, thanks for your effort on looking at this, it helped a lot.