summaryrefslogtreecommitdiffstats
path: root/pym/portage/process.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-08-14 02:15:08 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-08-14 02:15:08 +0200
commit216aeb7ab4854b278c809f07528534aefd44174d (patch)
tree50ac36831f3b2b7b7e03e6be47726b586aa2fe23 /pym/portage/process.py
parent247a541be25a9f4cd73287bf3c6443e1e32b9047 (diff)
downloadportage-216aeb7ab4854b278c809f07528534aefd44174d.tar.gz
portage-216aeb7ab4854b278c809f07528534aefd44174d.tar.bz2
portage-216aeb7ab4854b278c809f07528534aefd44174d.zip
Set PORTAGE_PYTHON in processes executed by portage.process._exec().
Diffstat (limited to 'pym/portage/process.py')
-rw-r--r--pym/portage/process.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index 9f6ec0e56..331e88059 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -355,7 +355,7 @@ def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask,
# Then assign them to what they should be.
for fd in my_fds:
os.dup2(my_fds[fd], fd)
- # Then close _all_ fds that haven't been explictly
+ # Then close _all_ fds that haven't been explicitly
# requested to be kept open.
for fd in get_open_fds():
if fd not in my_fds:
@@ -375,6 +375,9 @@ def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask,
os.umask(umask)
if pre_exec:
pre_exec()
+
+ # Set requested Python interpreter for Portage helpers.
+ env['PORTAGE_PYTHON'] = sys.executable
# And switch to the new process.
os.execve(binary, myargs, env)