When go module is enabled, the directory under its cache has permission defaults to 0500, which prevent them to be removed by a non-priviledged account. Reproducible: Always Steps to Reproduce: Emerge any package inherit go-module, and doesn't remove temp files inside Makefile, e.g. dev-util/webhook, dev-util/github-cli. Actual Results: Emerge failed with "portage.exception.PermissionDenied: [Errno 13] Permission denied" raised by prepare_build_dirs.py. Expected Results: Emerge success. Possible fix: Go 1.14[1] introduced a new build option: -modcacherw, which could be added to the default GOFLAGS exported by go-module.eclass when under prefix, e.g.: export GOFLAGS="-v -x -modcacherw" though it requires go-1.14 at least. [1]: https://golang.org/doc/go1.14#go-command
does this have anything to do with Gentoo Prefix?