Commit Graph

8 Commits

Author SHA1 Message Date
Alexander Yurkov
cf221090ed classes: go-vendor: Change symlink creation.
Create missing directories required to create the symlink.

Use relative symlinks to stay in the build directory scope (to avoid sstate issue with absolute paths).

(From OE-Core rev: 6c4e3206b6537f714416688cf8c921dd21cdfc20)

Signed-off-by: Alexander Yurkov <alexander.v.yurkov@gmail.com>
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-27 15:47:09 +00:00
Richard Purdie
c323d56244 go-vendor: Fix absolute paths issue
When building with the class, avoid errors like:

"sstate found an absolute path symlink /xxx/vendor pointing at
/xxx/import/vendor. Please replace this with a relative link."

Use relative symlinks instead.

(From OE-Core rev: fc4f589cc7a8e5feba7940ccb244a74bd5f96371)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-08 12:37:20 +00:00
Joshua Watt
09eb747db8 classes/go-vendor: Use UNPACKDIR instead of WORKDIR
modules.txt is provided using file:// in SRC_URI, therefore it will be
found in UNPACKDIR instead of WORKDIR

(From OE-Core rev: 114fe16f96280f40a9cea20b02b2743be42645dd)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-28 00:07:30 +00:00
Vyacheslav Yurkov
4eca05e15b classes: go-vendor: Unlink vendor dir later
Vendor directory might still be required during install stage, so defer
the removal until later stage.

(From OE-Core rev: f4538e3884a0cfa07e16e6a2c986271cc7322dd8)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Vyacheslav Yurkov
3e579c303e classes: go-vendor: Handle modules from the same repo
Take into account module version when populating vendor directory,
because a module with the same URL but with a different version tag
could be used as an indirect dependency.

(From OE-Core rev: 8f6320c0858941b2441e290ef3586b48c2700cd1)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Vyacheslav Yurkov
d5e2279d21 classes: go-vendor: Reference local modules
Create symlinks for local modules, which are usually not referenced in
the SRC_URI, but still expected to be found in the vendor directory
during the build.

(From OE-Core rev: 16da5d9ad448aafd8b5fd63480727bd1b09ec9f1)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Richard Purdie
7e0e0ef000 go-vendor: Minor style tweaks
Drop a len() usage that isn't needed, drop a comment that isn't needed
and use bb.fatal() to end the task with an error.

(From OE-Core rev: 1b9cf9cc2a52902e1181d2dac2ba9f2c3172835a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-08 10:56:35 +00:00
Lukas Funke
22f8fdbe7f classes: go-vendor: Add go-vendor class
(From OE-Core rev: d61bdf392e10140671ca56f2a2b0dc824be8ab80)

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-06 16:41:11 +00:00