1 |
commit: 28fd92fe913eea196eab39b188b0788463c924d0 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 26 00:41:31 2021 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 26 00:41:31 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28fd92fe |
7 |
|
8 |
go-module.eclass: fix GOPROXY export |
9 |
|
10 |
This variable should be exported in the go-module_set_globals function |
11 |
since it is not needed unless EGO_SUM is used. |
12 |
|
13 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
14 |
|
15 |
eclass/go-module.eclass | 6 ++++-- |
16 |
1 file changed, 4 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass |
19 |
index c9a7ab12eaf..9d64ad48b43 100644 |
20 |
--- a/eclass/go-module.eclass |
21 |
+++ b/eclass/go-module.eclass |
22 |
@@ -232,6 +232,9 @@ go-module_set_globals() { |
23 |
readonly EGO_SUM_SRC_URI |
24 |
readonly _GOMODULE_GOSUM_REVERSE_MAP |
25 |
|
26 |
+ # export the GOPROXY setting |
27 |
+ export GOPROXY="file://${T}/go-proxy" |
28 |
+ |
29 |
# Set the guard that we are safe |
30 |
_GO_MODULE_SET_GLOBALS_CALLED=1 |
31 |
} |
32 |
@@ -268,7 +271,7 @@ _go-module_src_unpack_gosum() { |
33 |
die "go-module_set_globals must be called in global scope" |
34 |
fi |
35 |
|
36 |
- local goproxy_dir="${T}/go-proxy" |
37 |
+ local goproxy_dir="${GOPROXY/file:\/\//}" |
38 |
mkdir -p "${goproxy_dir}" || die |
39 |
|
40 |
# For each Golang module distfile, look up where it's supposed to go, and |
41 |
@@ -293,7 +296,6 @@ _go-module_src_unpack_gosum() { |
42 |
unpack "$f" |
43 |
fi |
44 |
done |
45 |
- export GOPROXY="file://${goproxy_dir}" |
46 |
|
47 |
# Validate the gosum now |
48 |
_go-module_src_unpack_verify_gosum |