-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Always use os-release
rather than /lib
to detect NixOS
(bootstrap)
#115090
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @ozkanonur (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to adjust https://github.com/rust-lang/rust/blob/master/src/bootstrap/download.rs#L100-L108 with the same changes
@rustbot author |
[Two users over on zulip](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Bootstrapping.20on.20NixOS) bumped into issues where NixOS wasn't being properly detected. I believe this was caused by the presence of `/lib` on their machines. `/lib` is not standard on NixOS but can still be created by users or scripts. We are already checking `/etc/os-release`. The presence of `ID=nixos` in it's output should be trustworthy and we shouldn't then go on to also check for `/lib`.
eab7700
to
0e070aa
Compare
@rustbot review |
os-release
rather than /lib
to detect NixOS
(bootstrap.py)os-release
rather than /lib
to detect NixOS
(bootstrap)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
@bors r+ rollup |
…mpiler-errors Rollup of 6 pull requests Successful merges: - rust-lang#114959 (fix rust-lang#113702 emit a proper diagnostic message for unstable lints passed from CLI) - rust-lang#115011 (Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`)) - rust-lang#115077 (Do not emit invalid suggestion in E0191 when spans overlap) - rust-lang#115087 (Add disclaimer on size assertion macro) - rust-lang#115090 (Always use `os-release` rather than `/lib` to detect `NixOS` (bootstrap)) - rust-lang#115101 (triagebot: add dependency licensing pings) r? `@ghost` `@rustbot` modify labels: rollup
Two users over on zulip bumped into issues where NixOS wasn't being properly detected.
I believe this was caused by the presence of
/lib
on their machines./lib
is not standard on NixOS but can still be created by users or scripts.We are already checking
/etc/os-release
. The presence ofID=nixos
in it's output should be trustworthy and we shouldn't then go on to also check for/lib
.