From a7f89f8561b50162127cbbab1c0b0c3f5ed4164e Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 10 Mar 2020 16:38:16 -0700 Subject: [PATCH] eclass/go-module: remove go-get for corner case of unneeded deep build dependencies The helper function used to call 'go get' to verify by fake-fetching everything from the main go.mod. However 'go get' also turns out to recursively try to fetch everything in dependencies, even materials that are used only for tests of the dependencies, or code generation. If EGO_SUM is missing an entry now, it will fail during the build process rather than the helper function. Signed-off-by: Robin H. Johnson --- eclass/go-module.eclass | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass index 4edffa70e42b..17d37494f15f 100644 --- a/eclass/go-module.eclass +++ b/eclass/go-module.eclass @@ -415,17 +415,12 @@ _go-module_src_unpack_verify_gosum() { einfo "Tidying go.mod/go.sum" go mod tidy >/dev/null - # Verify that all needed modules are really present, by fetching everything - # in the package's main go.mod. If the EGO_SUM was missing an entry then - # 'go mod tidy' && 'go get' will flag it. - # -v = verbose - # -d = download only, don't install - einfo "Verifying linked Golang modules" - go get \ - -v \ - -d \ - all \ - || die "Some module is missing, update EGO_SUM" + # This used to call 'go get' to verify by fetching everything from the main + # go.mod. However 'go get' also turns out to recursively try to fetch + # everything in dependencies, even materials that are used only for tests + # of the dependencies, or code generation. + # If EGO_SUM is missing an entry now, it will fail during the build process + # rather than this helper function. } # @FUNCTION: go-module_live_vendor -- 2.26.2