summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorWilliam Hubbs <william.hubbs@sony.com>2020-03-10 11:35:38 -0500
committerWilliam Hubbs <williamh@gentoo.org>2020-03-10 11:43:29 -0500
commitf3c78c7bd7a0ea69fafdf7d3747e6f4008a8afea (patch)
treeffe217bc416f9e3f5e9f7c3c9f36a45d1c859264 /eclass
parentprofiles: Mask doc USE on dev-python/aiohttp for arm (diff)
downloadgentoo-f3c78c7bd7a0ea69fafdf7d3747e6f4008a8afea.tar.gz
gentoo-f3c78c7bd7a0ea69fafdf7d3747e6f4008a8afea.tar.bz2
gentoo-f3c78c7bd7a0ea69fafdf7d3747e6f4008a8afea.zip
go-module.eclass: fix regression with -mod=vendor setting
If EGO_VENDOR is tested in global scope, it needs to be set before the eclass is inherited. Several ebuilds do not do this, so we need to perform this test and set -mod=vendor in the appropriate phase function. Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/go-module.eclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index 51484332335b..c3ad5159bad8 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -78,7 +78,6 @@ export GOCACHE="${T}/go-build"
# -mod=readonly do not update go.mod/go.sum but fail if updates are needed
# -mod=vendor use the vendor directory instead of downloading dependencies
export GOFLAGS="-v -x -mod=readonly"
-[[ ${#EGO_VENDOR[@]} -gt 0 ]] && GOFLAGS+=" -mod=vendor"
# Do not complain about CFLAGS etc since go projects do not use them.
QA_FLAGS_IGNORED='.*'
@@ -389,6 +388,7 @@ _go-module_src_unpack_vendor() {
-f "${DISTDIR}/${tarball}" || die
eend
done
+ [[ ${#EGO_VENDOR[@]} -gt 0 ]] && GOFLAGS+=" -mod=vendor"
eqawarn "${P}.ebuild: EGO_VENDOR will be removed in the future."
eqawarn "Please request that the author migrate to EGO_SUM."
}