-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Allow overriding vendored sources under sudo #40791
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR! Unfortunately though this is just a bug in the build system, and I don't think that this is the best way to tackle it. The rationale behind forcing usage of vendor sources is that This was a bug introduced in #39728 where the assumption that the vendor dir is always populated is no longer true. Unfortunately I don't know the best way to fix this bug. |
Could you explain this a bit more? The The I don't think it's unreasonable to allow a user to bypass vendor sources under |
Unfortunately it looks like the behavior of |
That's interesting. I never knew that. I'm struggling to think of a better solution though. Perhaps a new flag like |
I'd be ok with a solution that looks like:
|
ping @Slabity, any updates here? |
Hi @Slabity. We haven't been hearing from you for some time 🕸. I'll close the PR to keep our queue clean, but feel free to reopen it if you are still interested in this PR. |
When configuring rust to be built, the user can run
configure
with the option--disable-vendor
or putvendor = false
inconfig.toml
By default, when running the build system under
sudo
, the build system detects this and uses vendored crates to preserve the user's$HOME
. This overrides any explicit options.I believe that if a user is building under
sudo
and explicitly disables vendored sources, then the build system should respect that regardless. This patch allows for that.