1 |
commit: f3c78c7bd7a0ea69fafdf7d3747e6f4008a8afea |
2 |
Author: William Hubbs <william.hubbs <AT> sony <DOT> com> |
3 |
AuthorDate: Tue Mar 10 16:35:38 2020 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 10 16:43:29 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3c78c7b |
7 |
|
8 |
go-module.eclass: fix regression with -mod=vendor setting |
9 |
|
10 |
If EGO_VENDOR is tested in global scope, it needs to be set before the |
11 |
eclass is inherited. Several ebuilds do not do this, so we need to |
12 |
perform this test and set -mod=vendor in the appropriate phase function. |
13 |
|
14 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
15 |
|
16 |
eclass/go-module.eclass | 2 +- |
17 |
1 file changed, 1 insertion(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass |
20 |
index 51484332335..c3ad5159bad 100644 |
21 |
--- a/eclass/go-module.eclass |
22 |
+++ b/eclass/go-module.eclass |
23 |
@@ -78,7 +78,6 @@ export GOCACHE="${T}/go-build" |
24 |
# -mod=readonly do not update go.mod/go.sum but fail if updates are needed |
25 |
# -mod=vendor use the vendor directory instead of downloading dependencies |
26 |
export GOFLAGS="-v -x -mod=readonly" |
27 |
-[[ ${#EGO_VENDOR[@]} -gt 0 ]] && GOFLAGS+=" -mod=vendor" |
28 |
|
29 |
# Do not complain about CFLAGS etc since go projects do not use them. |
30 |
QA_FLAGS_IGNORED='.*' |
31 |
@@ -389,6 +388,7 @@ _go-module_src_unpack_vendor() { |
32 |
-f "${DISTDIR}/${tarball}" || die |
33 |
eend |
34 |
done |
35 |
+ [[ ${#EGO_VENDOR[@]} -gt 0 ]] && GOFLAGS+=" -mod=vendor" |
36 |
eqawarn "${P}.ebuild: EGO_VENDOR will be removed in the future." |
37 |
eqawarn "Please request that the author migrate to EGO_SUM." |
38 |
} |