Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/cmd/buildlet: removeAllIncludingReadonly doesn't remove read-only files on Plan 9 #35634

Closed
0intro opened this issue Nov 16, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@0intro
Copy link
Member

@0intro 0intro commented Nov 16, 2019

CL 177457 added the removeAllIncludingReadonly function to be able
to remove the read-only files and directories created by go mod.

https://github.com/golang/build/blob/c7f36d0/cmd/buildlet/buildlet.go#L1813

On Plan 9, the function returns after calling os.RemoveAll.
However, this doesn't work properly on Plan 9, since files cannot
be deleted from read-only directories.

The directories should be make writeable before being able to remove files.

@millerresearch

@0intro 0intro added the Builders label Nov 16, 2019
@0intro 0intro self-assigned this Nov 16, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 16, 2019
@millerresearch

This comment has been minimized.

Copy link

@millerresearch millerresearch commented Nov 16, 2019

Removing the || runtime.GOOS == "plan9" clause in removeAllIncludingReadonly should fix this. Also maybe correct the comment on the preceding line s/our emphermal/are ephemeral/ ?

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 16, 2019

Change https://golang.org/cl/207283 mentions this issue: cmd/buildlet: fix removeAllIncludingReadonly on Plan 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.