summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 20:17:52 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 20:17:52 +0000
commit15f89bc7b22ce7a02db1cf740ce10a550ea81dbb (patch)
tree2accf27870a795e2fe117f672042188b180f06da /pym
parent2e4455de659a26819c348903130f651dc6faf40c (diff)
downloadportage-15f89bc7b22ce7a02db1cf740ce10a550ea81dbb.tar.gz
portage-15f89bc7b22ce7a02db1cf740ce10a550ea81dbb.tar.bz2
portage-15f89bc7b22ce7a02db1cf740ce10a550ea81dbb.zip
Prevent CHOST vdb entries from being created for virtual packages.
(trunk r15353) svn path=/main/branches/2.1.7/; revision=15580
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py3
-rw-r--r--pym/portage/dbapi/vartree.py7
2 files changed, 10 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 32a7902d3..1330263cb 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5865,6 +5865,9 @@ def _post_src_install_chost_fix(settings):
CHOST variable, so revert it to the initial
setting.
"""
+ if settings.get('CATEGORY') == 'virtual':
+ return
+
chost = settings.get('CHOST')
if chost:
write_atomic(os.path.join(settings['PORTAGE_BUILDDIR'],
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 8f53b1f98..c2885b15c 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2336,6 +2336,13 @@ class dblink(object):
slot = ''
for var_name in ('CHOST', 'SLOT'):
+ if var_name == 'CHOST' and self.cat == 'virtual':
+ try:
+ os.unlink(os.path.join(inforoot, var_name))
+ except OSError:
+ pass
+ continue
+
try:
val = codecs.open(_unicode_encode(
os.path.join(inforoot, var_name),