Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731132 - Readonly go module cache prevent clean operation
Summary: Readonly go module cache prevent clean operation
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-07 00:01 UTC by anb
Modified: 2021-01-21 16:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anb 2020-07-07 00:01:29 UTC
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
Comment 1 Fabian Groffen gentoo-dev 2021-01-21 16:54:30 UTC
does this have anything to do with Gentoo Prefix?