summaryrefslogtreecommitdiffstats
path: root/bin/emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-15 04:38:35 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-15 04:38:35 +0000
commit94aea60ead91a0c23867d300a7aea820b4bf664a (patch)
treeba8bcb5552c8480ea62231e8559c416ded084bd5 /bin/emerge
parenteee8439f8a16f22457ab648a628944b06d4ea7dc (diff)
downloadportage-94aea60ead91a0c23867d300a7aea820b4bf664a.tar.gz
portage-94aea60ead91a0c23867d300a7aea820b4bf664a.tar.bz2
portage-94aea60ead91a0c23867d300a7aea820b4bf664a.zip
Add support for and ACCEPT_CHOSTS variable that controls masking behavior
for binary packages wrt CHOST. The variable is a space separated list of chosts. It support regular expressions, so if the actual chost contains any special characters then the user must escape them when setting ACCEPT_CHOSTS. (trunk r10654) svn path=/main/branches/2.1.2/; revision=10655
Diffstat (limited to 'bin/emerge')
-rwxr-xr-xbin/emerge10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/emerge b/bin/emerge
index db6985905..d607462bb 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1285,9 +1285,8 @@ def visible(pkgsettings, pkg):
"""
if not pkg.metadata["SLOT"]:
return False
- if pkg.built and not pkg.installed:
- pkg_chost = pkg.metadata.get("CHOST")
- if pkg_chost and pkg_chost != pkgsettings["CHOST"]:
+ if pkg.built and not pkg.installed and "CHOST" in pkg.metadata:
+ if not pkgsettings._accept_chost(pkg):
return False
if not portage.eapi_is_supported(pkg.metadata["EAPI"]):
return False
@@ -1306,9 +1305,8 @@ def get_masking_status(pkg, pkgsettings, root_config):
pkg, settings=pkgsettings,
portdb=root_config.trees["porttree"].dbapi)
- if pkg.built and not pkg.installed:
- pkg_chost = pkg.metadata.get("CHOST")
- if pkg_chost and pkg_chost != pkgsettings["CHOST"]:
+ if pkg.built and not pkg.installed and "CHOST" in pkg.metadata:
+ if not pkgsettings._accept_chost(pkg):
mreasons.append("CHOST: %s" % \
pkg.metadata["CHOST"])