go-mod.bbclass: Unpack module dependency license files

To keep the module cache logic in the go module fetchers simple, the
unpacking of the module zip files in the module cache directory is left
to the go install command in do_compile. So for do_populate_lic to find
the license files of module dependencies, do_compile needs to run before
do_populate_lic.

(From OE-Core rev: 35496654db325a4a904997be7a02fb04de74e9be)

Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christian Lindeberg 2024-09-17 08:35:13 +02:00 committed by Richard Purdie
parent 773579da26
commit 1f55d5c0a4

View File

@ -28,3 +28,7 @@ do_unpack[cleandirs] += "${GOMODCACHE}"
GO_WORKDIR ?= "${GO_IMPORT}"
do_compile[dirs] += "${B}/src/${GO_WORKDIR}"
# Make go install unpack the module zip files in the module cache directory
# before the license directory is polulated with license files.
addtask do_compile before do_populate_lic