On 2020-07-07 19:54, Miro Hrončok wrote:
1) Add a custom --no-warn-root-privileges option
2) Hide the warning when $RPM_BUILD_ROOT is set.
3) Introduce an environment variable (e.g. PIP_NOWARN_ROOT)
4) Introduce our warning upstream, but make it opt-in only.
5) Hide the warning when --root is set.
What do you think?
I like option 5 as well.
It's just a warning, not an error, because there are cases where you
"know what you're doing", such as containers/VMs, where "sudo pip"
be appropriate. All uses of --root that come to my mind are such cases.
Users who follow tutorials without "knowing what they're doing" are very
unlikely to use --root.