Spawning programs with an empty environment is not a sane default. It would be more useful to behave like the standard library's subprocess module, where the default env=None is equivalent to env=os.environ.
Patch sent for review: https://archives.gentoo.org/gentoo-portage-dev/message/8f6c045c92e32166da85c696790c0890 https://github.com/gentoo/portage/pull/384
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9810a30bf044d93c0348d46225ad6b2ae1a45df commit e9810a30bf044d93c0348d46225ad6b2ae1a45df Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-12-03 07:47:32 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-12-04 01:15:03 +0000 portage.process.spawn: inherit env by default (bug 672440) Make child processes inherit the current process's environment by default, so that behavior is equivalent to the standard library's subprocess module. Bug: https://bugs.gentoo.org/672440 Reviewed-by: Brian Dolbec <dolsen@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/process.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Fixed in portage-2.3.62.