go-mod.bbclass: Calculate GO_MOD_CACHE_DIR relative to ${UNPACKDIR}

Adapt to the recent move of S from ${WORKDIR} to ${UNPACKDIR}.

(From OE-Core rev: 5f8218c62637208259a94979fe9a8a9b672e4ea4)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt 2025-06-27 14:48:42 +01:00 committed by Richard Purdie
parent bd91904755
commit a9e835dbe6

View File

@ -23,7 +23,7 @@ GOBUILDFLAGS:append = " -modcacherw"
inherit go
export GOMODCACHE = "${S}/pkg/mod"
GO_MOD_CACHE_DIR = "${@os.path.relpath(d.getVar('GOMODCACHE'), d.getVar('WORKDIR'))}"
GO_MOD_CACHE_DIR = "${@os.path.relpath(d.getVar('GOMODCACHE'), d.getVar('UNPACKDIR'))}"
do_unpack[cleandirs] += "${GOMODCACHE}"
GO_WORKDIR ?= "${GO_IMPORT}"