From 94aea60ead91a0c23867d300a7aea820b4bf664a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 15 Jun 2008 04:38:35 +0000 Subject: 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 --- bin/emerge | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bin/emerge') 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"]) -- cgit v1.2.3-1-g7c22