summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/go-mod.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe/go-mod.bbclass')
-rw-r--r--meta/classes-recipe/go-mod.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes-recipe/go-mod.bbclass b/meta/classes-recipe/go-mod.bbclass
index ca3a690d05..a15dda8f0e 100644
--- a/meta/classes-recipe/go-mod.bbclass
+++ b/meta/classes-recipe/go-mod.bbclass
@@ -22,9 +22,13 @@ 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('UNPACKDIR'))}"
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 31
28export GOMODCACHE = "${B}/.mod" 32# Make go install unpack the module zip files in the module cache directory
29 33# before the license directory is polulated with license files.
30do_compile[cleandirs] += "${B}/.mod" 34addtask do_compile before do_populate_lic