pmb: run: proxy environments don't inherit to `chroot`
Even HTTPS_PROXY
etc.. variables are set in the host enviroment, pmbootstrap chroot
does not inherit these environments.
Looking at the source, we indeed have code that tries to preserve these environments here
But it does not work at least for pmbootstrap chroot
since the code here invokes env -i
and sudo
without -E
. So the enviroment is fixed to the list defined here.
This can be fixed by removing env -i
and add -E
to sudo
in pmb/chroot/root.py. But the result it that all environments from host system is passed to the chroot
environment, which should not be what we really want.
So i create this issue to discuss how we can fix it properly, without editing too much code.
This problem may also applies to many other components such as install
, build
, etc... I just happened to be using pmbootstrap chroot
, so use it as an example.