# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+import os
import sys
+sys.path.insert(0, os.environ['PORTAGE_PYM_PATH'])
import portage
def main(args):
self._proc = SpawnProcess(
args=[portage._python_interpreter,
os.path.join(portage._bin_path, 'lock-helper.py'), self.path],
- env=os.environ,
+ env=dict(os.environ, PORTAGE_PYM_PATH=portage._pym_path),
fd_pipes={0:out_pr, 1:in_pw, 2:sys.stderr.fileno()},
scheduler=self.scheduler)
self._proc.addExitListener(self._proc_exit)
_python_interpreter = os.path.realpath(sys.executable)
_bin_path = PORTAGE_BIN_PATH
+_pym_path = PORTAGE_PYM_PATH
def _ensure_default_encoding():
shutil.copytree(var_orig, var_new, symlinks=True)
os.chmod(var_new, dir_perms)
portage._bin_path = settings['PORTAGE_BIN_PATH']
+ portage._pym_path = settings['PORTAGE_PYM_PATH']
os.chmod(base_path_tmp, dir_perms)
# This serves so pre-load the modules.
_preload_elog_modules(self.settings)