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
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
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: ---


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):

commit e9810a30bf044d93c0348d46225ad6b2ae1a45df
Author:     Zac Medico <>
AuthorDate: 2018-12-03 07:47:32 +0000
Commit:     Zac Medico <>
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.
    Reviewed-by: Brian Dolbec <>
    Signed-off-by: Zac Medico <>

 lib/portage/ | 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.