Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 672440

Summary: sys-apps/portage: portage.process.spawn env={} default is insane
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: matoro_bugzilla_gentoo
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 671498    

Description Zac Medico gentoo-dev 2018-12-03 06:45:26 UTC
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.
Comment 2 Larry the Git Cow gentoo-dev 2018-12-04 01:35:30 UTC
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(-)
Comment 3 Zac Medico gentoo-dev 2019-04-10 04:32:06 UTC
Fixed in portage-2.3.62.