summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChristian Lindeberg <christian.lindeberg@axis.com>2024-09-13 09:29:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-20 10:45:45 +0100
commit773579da26c97ebd6e1cff3986487dfb6d6ceed3 (patch)
treebb5c03e0c9f610e80c9d0c374cf672174f5af7c4 /meta
parentd72b027a0ac4bc496003465da0f9c6e6c89457fe (diff)
downloadpoky-773579da26c97ebd6e1cff3986487dfb6d6ceed3.tar.gz
go-mod.bbclass: Set GO_MOD_CACHE_DIR
Set the GO_MOD_CACHE_DIR variable and move the location of the module cache to enable the use of the go module fetchers for downloading and unpacking module dependencies to the module cache. Also, clean out the module cache before unpacking. (From OE-Core rev: 287daff0bbd877990ce272e10601d4540d71f239) Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-recipe/go-mod.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes-recipe/go-mod.bbclass b/meta/classes-recipe/go-mod.bbclass
index ca3a690d05..2083d7f2d1 100644
--- a/meta/classes-recipe/go-mod.bbclass
+++ b/meta/classes-recipe/go-mod.bbclass
@@ -22,9 +22,9 @@ GOBUILDFLAGS:append = " -modcacherw"
22 22
23inherit go 23inherit go
24 24
25export GOMODCACHE = "${S}/pkg/mod"
26GO_MOD_CACHE_DIR = "${@os.path.relpath(d.getVar('GOMODCACHE'), d.getVar('WORKDIR'))}"
27do_unpack[cleandirs] += "${GOMODCACHE}"
28
25GO_WORKDIR ?= "${GO_IMPORT}" 29GO_WORKDIR ?= "${GO_IMPORT}"
26do_compile[dirs] += "${B}/src/${GO_WORKDIR}" 30do_compile[dirs] += "${B}/src/${GO_WORKDIR}"
27
28export GOMODCACHE = "${B}/.mod"
29
30do_compile[cleandirs] += "${B}/.mod"