Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 10 Mar 2020 23:39:26
Message-Id: 1583883557.a7f89f8561b50162127cbbab1c0b0c3f5ed4164e.robbat2@gentoo
1 commit: a7f89f8561b50162127cbbab1c0b0c3f5ed4164e
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 10 23:38:16 2020 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 10 23:39:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7f89f85
7
8 eclass/go-module: remove go-get for corner case of unneeded deep build dependencies
9
10 The helper function used to call 'go get' to verify by fake-fetching everything
11 from the main go.mod. However 'go get' also turns out to recursively try to
12 fetch everything in dependencies, even materials that are used only for tests
13 of the dependencies, or code generation.
14
15 If EGO_SUM is missing an entry now, it will fail during the build process
16 rather than the helper function.
17
18 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
19
20 eclass/go-module.eclass | 17 ++++++-----------
21 1 file changed, 6 insertions(+), 11 deletions(-)
22
23 diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
24 index 4edffa70e42..17d37494f15 100644
25 --- a/eclass/go-module.eclass
26 +++ b/eclass/go-module.eclass
27 @@ -415,17 +415,12 @@ _go-module_src_unpack_verify_gosum() {
28 einfo "Tidying go.mod/go.sum"
29 go mod tidy >/dev/null
30
31 - # Verify that all needed modules are really present, by fetching everything
32 - # in the package's main go.mod. If the EGO_SUM was missing an entry then
33 - # 'go mod tidy' && 'go get' will flag it.
34 - # -v = verbose
35 - # -d = download only, don't install
36 - einfo "Verifying linked Golang modules"
37 - go get \
38 - -v \
39 - -d \
40 - all \
41 - || die "Some module is missing, update EGO_SUM"
42 + # This used to call 'go get' to verify by fetching everything from the main
43 + # go.mod. However 'go get' also turns out to recursively try to fetch
44 + # everything in dependencies, even materials that are used only for tests
45 + # of the dependencies, or code generation.
46 + # If EGO_SUM is missing an entry now, it will fail during the build process
47 + # rather than this helper function.
48 }
49
50 # @FUNCTION: go-module_live_vendor