On Wed, Feb 19, 2020 at 12:18:24AM -0600, William Hubbs wrote:
> > +RDEPEND+=">=dev-vcs/git-1.7.3"
> > +BDEPEND+=">=dev-lang/go-1.13"
> > +GOPATH="${WORKDIR}"
> You don't need += here 
I've taken to += as a cleaner variant than xDEPEND="${xDEPEND} cat/pn"
when the eclass MAY be setting some dependencies already.

> or any value of GOPATH.
GOPATH is required in fact!

Without it being set, it inherits GOPATH from my scope when I run emerge
or ebuild, and since the portage user doesn't have permission to write
in that path, the Golang mod tooling fails during src_unpack for the
tidy/get calls. If those are skipped, then it fails during the build.
The vendor mode didn't have this issue, because it handles differently.

I do note that this is despite what the Golang docs say about
GO111MODULE envvar being set should cause GOPATH to be ignored.

The other two packages, go-tour and kube-bench explicitly set GOPATH in
their builds, so didn't run into this.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : [email protected]
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

Attachment: signature.asc
Description: PGP signature

Reply via email to