Prevent CHOST vdb entries from being created for virtual packages.
authorZac Medico <zmedico@gentoo.org>
Sun, 14 Feb 2010 05:56:34 +0000 (05:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 14 Feb 2010 05:56:34 +0000 (05:56 -0000)
svn path=/main/trunk/; revision=15353

pym/portage/__init__.py
pym/portage/dbapi/vartree.py

index d7f3a7fb3c334ca46c42382197a06f0affd958ee..e3e484fb1935fb067f791207d6932c29549b3800 100644 (file)
@@ -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'],
index 48d58350e5798e1d2b2e35c79d7704c1bf3619db..e0dd4a707bcfda7df7afe26e4670b829bd9da920 100644 (file)
@@ -3448,6 +3448,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),