summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-10 20:44:13 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-10 20:44:13 +0000
commit121b7ecdc7ecf56cc8b4181c207091a7f8e435e5 (patch)
tree4d0065dbd12b8a473f1f8701177448ec922affab
parenta6eef43e39ef8f3be6f45d27253ebe130130c198 (diff)
downloadportage-121b7ecdc7ecf56cc8b4181c207091a7f8e435e5.tar.gz
portage-121b7ecdc7ecf56cc8b4181c207091a7f8e435e5.tar.bz2
portage-121b7ecdc7ecf56cc8b4181c207091a7f8e435e5.zip
Make the CHOST visibility check tolerant of missing CHOST metadata.
svn path=/main/trunk/; revision=9817
-rw-r--r--pym/_emerge/__init__.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index c947eafe9..afccdc803 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1095,9 +1095,10 @@ def visible(pkgsettings, pkg):
"""
if not pkg.metadata["SLOT"]:
return False
- if pkg.built and not pkg.installed and \
- pkg.metadata["CHOST"] != pkgsettings["CHOST"]:
- return False
+ if pkg.built and not pkg.installed:
+ pkg_chost = pkg.metadata.get("CHOST")
+ if pkg_chost and pkg_chost != pkgsettings["CHOST"]:
+ return False
if not portage.eapi_is_supported(pkg.metadata["EAPI"]):
return False
if not pkg.installed and \
@@ -1120,10 +1121,11 @@ def get_masking_status(pkg, pkgsettings, root_config):
pkg, settings=pkgsettings,
portdb=root_config.trees["porttree"].dbapi)
- if pkg.built and not pkg.installed and \
- pkg.metadata["CHOST"] != root_config.settings["CHOST"]:
- mreasons.append("CHOST: %s" % \
- pkg.metadata["CHOST"])
+ if pkg.built and not pkg.installed:
+ pkg_chost = pkg.metadata.get("CHOST")
+ if pkg_chost and pkg_chost != pkgsettings["CHOST"]:
+ mreasons.append("CHOST: %s" % \
+ pkg.metadata["CHOST"])
if not pkg.metadata["SLOT"]:
mreasons.append("invalid: SLOT is undefined")