]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
go-mod.bbclass: Unpack module dependency license files
authorChristian Lindeberg <christian.lindeberg@axis.com>
Tue, 17 Sep 2024 06:35:13 +0000 (08:35 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Sep 2024 07:37:46 +0000 (08:37 +0100)
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.

Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/go-mod.bbclass

index 2083d7f2d1d69f4f684f76493b8c0726fd01fc18..93ae72235ff5342d6e1ee3bb5152ea8b370eaf42 100644 (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