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

Don't fail if we can't acquire readonly lock #7149

Merged
merged 1 commit into from
Jul 19, 2019

Conversation

alexcrichton
Copy link
Member

This commit updates support from #6940 to not only gracefully handle
situations where the lock can be acquired in readonly but not read/write
mode but also handle situations where even a readonly lock can't be
acquired. If a readonly lock can't be acquired (and the read/write
failed) then we likely can't touch anything in the directory, so there's
no value gained from locking anyway.

Closes #7147

This commit updates support from rust-lang#6940 to not only gracefully handle
situations where the lock can be acquired in readonly but not read/write
mode but also handle situations where even a readonly lock can't be
acquired. If a readonly lock can't be acquired (and the read/write
failed) then we likely can't touch anything in the directory, so there's
no value gained from locking anyway.

Closes rust-lang#7147
@rust-highfive
Copy link

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 19, 2019
@ehuss
Copy link
Contributor

ehuss commented Jul 19, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 19, 2019

📌 Commit 650ae65 has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 19, 2019
@bors
Copy link
Collaborator

bors commented Jul 19, 2019

⌛ Testing commit 650ae65 with merge 2b21fa6...

bors added a commit that referenced this pull request Jul 19, 2019
Don't fail if we can't acquire readonly lock

This commit updates support from #6940 to not only gracefully handle
situations where the lock can be acquired in readonly but not read/write
mode but also handle situations where even a readonly lock can't be
acquired. If a readonly lock can't be acquired (and the read/write
failed) then we likely can't touch anything in the directory, so there's
no value gained from locking anyway.

Closes #7147
@bors
Copy link
Collaborator

bors commented Jul 19, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: ehuss
Pushing 2b21fa6 to master...

@bors bors merged commit 650ae65 into rust-lang:master Jul 19, 2019
@nbp
Copy link

nbp commented Jul 23, 2019

I can still reproduce this issue on stable, beta and nightly when the HOME environment variable is set to a non-existing directory, and that the file .package-cache does not exists.

-- edit: Adding references of other github issue:
mozilla/nixpkgs-mozilla#193
NixOS/nixpkgs#61618
NixOS/nixpkgs#61192

@ehuss
Copy link
Contributor

ehuss commented Jul 23, 2019

@nbp nightly hasn't been updated, yet. It is updated around once a week, I'll probably do it today, and it may show up in a couple days after that.

@nbp
Copy link

nbp commented Jul 23, 2019

Thanks for the notice, I did not saw that this was only fixed 4 days ago.

Would it be possible to backport it to stable once it is checked on Nightly?

@ehuss
Copy link
Contributor

ehuss commented Jul 23, 2019

It may be difficult to backport to stable. Generally stable point releases are only made for very critical issues, and AFAIK there isn't anything queued to justify a stable release. I realize that breaking the build for Debian is painful, though. I think that's a call for the release team. I'm not sure what the official process would be, but I would just ask them on #release on Discord if you want to make a case for it. I've only ever backported something to stable once, and that was opportunistic because a stable point release was being made for other reasons.

I'll prepare a beta backport now, though.

@alexcrichton alexcrichton deleted the maybe-no-lock branch July 24, 2019 16:51
bors added a commit to rust-lang/rust that referenced this pull request Jul 26, 2019
Update cargo

11 commits in e3563dbdcd2e370bc4f11d080f739d82d25773fd..d0f828419d6ce6be21a90866964f58eb2c07cd56
2019-07-16 19:22:44 +0000 to 2019-07-23 21:58:59 +0000
- Remove include/exclude glob warning. (rust-lang/cargo#7170)
- Optimize lock file format for git merge conflicts (rust-lang/cargo#7070)
- Set up CI with Azure Pipelines (rust-lang/cargo#7139)
- Force clippy to run. (rust-lang/cargo#7157)
- Work around #61440 (rust-lang/cargo#7158)
- initial working version of cargo fix --clippy (rust-lang/cargo#7069)
- Optimize runtime of `#[cargo_test_macro]` (rust-lang/cargo#7146)
- Don't fail if we can't acquire readonly lock (rust-lang/cargo#7149)
- Add support for multiple --features options (rust-lang/cargo#7084)
- Fix a typo in an env var name (rust-lang/cargo#7145)
- Add a way to disable all nightly tests (rust-lang/cargo#7142)
@ehuss ehuss modified the milestones: 1.38.0, 1.37.0 Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo --frozen requires the cargo home to be writable
6 participants