Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672440 - sys-apps/portage: portage.process.spawn env={} default is insane
Summary: sys-apps/portage: portage.process.spawn env={} default is insane
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 671498
  Show dependency tree
 
Reported: 2018-12-03 06:45 UTC by Zac Medico
Modified: 2019-04-10 04:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.