From: Christian Lindeberg Date: Tue, 17 Sep 2024 06:35:13 +0000 (+0200) Subject: go-mod.bbclass: Unpack module dependency license files X-Git-Tag: yocto-5.2~1773 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35496654db325a4a904997be7a02fb04de74e9be;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Christian Lindeberg Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/go-mod.bbclass b/meta/classes-recipe/go-mod.bbclass index 2083d7f2d1d..93ae72235ff 100644 --- a/meta/classes-recipe/go-mod.bbclass +++ b/meta/classes-recipe/go-mod.bbclass @@ -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