summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2021-05-25 19:41:31 -0500
committerWilliam Hubbs <williamh@gentoo.org>2021-05-25 19:41:31 -0500
commit28fd92fe913eea196eab39b188b0788463c924d0 (patch)
tree3173dcf5e1dc5124069c8b8d7ce01e5d46d4a0ef /eclass
parentapp-emulation/containerd: apply #nowarn properly to -j1 (diff)
downloadgentoo-28fd92fe913eea196eab39b188b0788463c924d0.tar.gz
gentoo-28fd92fe913eea196eab39b188b0788463c924d0.tar.bz2
gentoo-28fd92fe913eea196eab39b188b0788463c924d0.zip
go-module.eclass: fix GOPROXY export
This variable should be exported in the go-module_set_globals function since it is not needed unless EGO_SUM is used. Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/go-module.eclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index c9a7ab12eaf0..9d64ad48b431 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -232,6 +232,9 @@ go-module_set_globals() {
readonly EGO_SUM_SRC_URI
readonly _GOMODULE_GOSUM_REVERSE_MAP
+ # export the GOPROXY setting
+ export GOPROXY="file://${T}/go-proxy"
+
# Set the guard that we are safe
_GO_MODULE_SET_GLOBALS_CALLED=1
}
@@ -268,7 +271,7 @@ _go-module_src_unpack_gosum() {
die "go-module_set_globals must be called in global scope"
fi
- local goproxy_dir="${T}/go-proxy"
+ local goproxy_dir="${GOPROXY/file:\/\//}"
mkdir -p "${goproxy_dir}" || die
# For each Golang module distfile, look up where it's supposed to go, and
@@ -293,7 +296,6 @@ _go-module_src_unpack_gosum() {
unpack "$f"
fi
done
- export GOPROXY="file://${goproxy_dir}"
# Validate the gosum now
_go-module_src_unpack_verify_gosum