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
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Milestone

Comments

@0intro
Copy link
Member

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 x/build issues (builders, bots, dashboards) label Nov 16, 2019
@0intro 0intro self-assigned this Nov 16, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 16, 2019
@millerresearch
Copy link
Contributor

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
Copy link

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

@golang golang locked and limited conversation to collaborators Nov 15, 2020
@rsc rsc unassigned 0intro Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants