From 28fd92fe913eea196eab39b188b0788463c924d0 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 25 May 2021 19:41:31 -0500 Subject: 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 --- eclass/go-module.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'eclass') 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 -- cgit v1.2.3-65-gdbad