aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-15 01:18:19 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-15 01:18:19 -0700
commit1555b4a2f1811e1e396c30e3db42b8044a4f98d9 (patch)
tree49e939ab5ab051d48d519667683022c990c7290d /pym/portage/tests/ebuild/test_ipc_daemon.py
parentMake create_trees() pass along PORTAGE_GRPNAME and PORTAGE_USERNAME (diff)
downloadportage-1555b4a2f1811e1e396c30e3db42b8044a4f98d9.tar.gz
portage-1555b4a2f1811e1e396c30e3db42b8044a4f98d9.tar.bz2
portage-1555b4a2f1811e1e396c30e3db42b8044a4f98d9.zip
Pass along PORTAGE_USERNAME and PORTAGE_GRPNAME since they
need to be inherited by ebuild subprocesses.
Diffstat (limited to 'pym/portage/tests/ebuild/test_ipc_daemon.py')
-rw-r--r--pym/portage/tests/ebuild/test_ipc_daemon.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/tests/ebuild/test_ipc_daemon.py b/pym/portage/tests/ebuild/test_ipc_daemon.py
index f0d072aed..5a5f860fb 100644
--- a/pym/portage/tests/ebuild/test_ipc_daemon.py
+++ b/pym/portage/tests/ebuild/test_ipc_daemon.py
@@ -20,10 +20,19 @@ class IpcDaemonTestCase(TestCase):
tmpdir = tempfile.mkdtemp()
try:
env = {}
+
+ # Pass along PORTAGE_USERNAME and PORTAGE_GRPNAME since they
+ # need to be inherited by ebuild subprocesses.
+ if 'PORTAGE_USERNAME' in os.environ:
+ env['PORTAGE_USERNAME'] = os.environ['PORTAGE_USERNAME']
+ if 'PORTAGE_GRPNAME' in os.environ:
+ env['PORTAGE_GRPNAME'] = os.environ['PORTAGE_GRPNAME']
+
env['PORTAGE_PYTHON'] = sys.executable
env['PORTAGE_BIN_PATH'] = PORTAGE_BIN_PATH
env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH
env['PORTAGE_BUILDDIR'] = tmpdir
+
input_fifo = os.path.join(tmpdir, '.ipc_in')
output_fifo = os.path.join(tmpdir, '.ipc_out')
os.mkfifo(input_fifo)