diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-14 05:56:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-14 05:56:34 +0000 |
commit | 9889f355d890f0ad6e604f0064c2459273af35a4 (patch) | |
tree | b183d643856384f7c46e5b9715547494fbc1ecf8 | |
parent | c089d3fb840fcb9a552f276e948381c45653db90 (diff) | |
download | portage-9889f355d890f0ad6e604f0064c2459273af35a4.tar.gz portage-9889f355d890f0ad6e604f0064c2459273af35a4.tar.bz2 portage-9889f355d890f0ad6e604f0064c2459273af35a4.zip |
Prevent CHOST vdb entries from being created for virtual packages.
svn path=/main/trunk/; revision=15353
-rw-r--r-- | pym/portage/__init__.py | 3 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index d7f3a7fb3..e3e484fb1 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 48d58350e..e0dd4a707 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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), |