svn commit: r527631 - head/Mk/Uses
Dmitri Goutnik
dmgk at FreeBSD.org
Mon Mar 2 13:58:41 UTC 2020
Author: dmgk
Date: Mon Mar 2 13:58:40 2020
New Revision: 527631
URL: https://svnweb.freebsd.org/changeset/ports/527631
Log:
Mk/Uses/go.mk: Avoid pollution of Go module cache with modules downloaded by gomod-vendor
Use module cache local to the WRKDIR and add the -modcacherw flag (available in
go1.14 [1, 2]) to instruct go mod vendor to leave directories in the module
cache read-write instead of making them unwritable.
[1] https://github.com/golang/go/issues/31481
[2] https://go-review.googlesource.com/c/go/+/202079/
Reviewed by: swills
Differential Revision: https://reviews.freebsd.org/D23063
Modified:
head/Mk/Uses/go.mk
Modified: head/Mk/Uses/go.mk
==============================================================================
--- head/Mk/Uses/go.mk Mon Mar 2 13:48:35 2020 (r527630)
+++ head/Mk/Uses/go.mk Mon Mar 2 13:58:40 2020 (r527631)
@@ -179,7 +179,7 @@ _MODULES2TUPLE_CMD= modules2tuple
gomod-vendor: patch
@if type ${GO_CMD} > /dev/null 2>&1; then \
if type ${_MODULES2TUPLE_CMD} > /dev/null 2>&1; then \
- cd ${WRKSRC}; ${GO_CMD} mod vendor; \
+ cd ${WRKSRC}; ${SETENV} GOPATH=${WRKDIR}/.gopath GOFLAGS=-modcacherw ${GO_CMD} mod vendor; \
[ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt; \
else \
${ECHO_MSG} "===> Please install \"ports-mgmt/modules2tuple\""; \
More information about the svn-ports-all
mailing list