aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-07-01 13:07:27 -0700
committerZac Medico <zmedico@gentoo.org>2012-07-01 13:07:27 -0700
commit77703d4f3660374068c275369670dcfe9c2f4131 (patch)
tree1f7c7c4403c6b9105f3e09310f7a6d9d9dd952b2
parentFix bugs in binarytree.invalids usage. (diff)
downloadportage-77703d4f3660374068c275369670dcfe9c2f4131.tar.gz
portage-77703d4f3660374068c275369670dcfe9c2f4131.tar.bz2
portage-77703d4f3660374068c275369670dcfe9c2f4131.zip
_quickpkg_dblink: set PYTHONPATH for quickpkg
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index e5e119536..dd37be005 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -4745,6 +4745,12 @@ class dblink(object):
env = dict(self.vartree.settings.items())
env["__PORTAGE_INHERIT_VARDB_LOCK"] = "1"
+ pythonpath = [x for x in env.get('PYTHONPATH', '').split(":") if x]
+ if not pythonpath or \
+ not os.path.samefile(pythonpath[0], portage._pym_path):
+ pythonpath.insert(0, portage._pym_path)
+ env['PYTHONPATH'] = ":".join(pythonpath)
+
quickpkg_proc = SpawnProcess(
args=[portage._python_interpreter, quickpkg_binary,
"=%s" % (backup_dblink.mycpv,)],