"""
if not pkg.metadata["SLOT"]:
return False
- if pkg.built and not pkg.installed and "CHOST" in pkg.metadata:
- if not pkgsettings._accept_chost(pkg):
+ if not pkg.installed:
+ if not pkgsettings._accept_chost(pkg.cpv, pkg.metadata):
return False
eapi = pkg.metadata["EAPI"]
if not portage.eapi_is_supported(eapi):
pkg, settings=pkgsettings,
portdb=root_config.trees["porttree"].dbapi)
- if pkg.built and not pkg.installed and "CHOST" in pkg.metadata:
- if not pkgsettings._accept_chost(pkg):
+ if not pkg.installed:
+ if not pkgsettings._accept_chost(pkg.cpv, pkg.metadata):
mreasons.append("CHOST: %s" % \
pkg.metadata["CHOST"])
if metadata and not built:
pkgsettings.setcpv(cpv, mydb=metadata)
metadata["USE"] = pkgsettings["PORTAGE_USE"]
+ metadata['CHOST'] = pkgsettings.get('CHOST', '')
if metadata is None:
mreasons = ["corruption"]
else:
cpv=mykey, metadata=metadata, onlydeps=onlydeps)
pkgsettings.setcpv(pkg)
pkg.metadata["USE"] = pkgsettings["PORTAGE_USE"]
+ pkg.metadata['CHOST'] = pkgsettings.get('CHOST', '')
self._pkg_cache[pkg] = pkg
args.append(PackageArg(arg=x, package=pkg,
root_config=root_config))
onlydeps=onlydeps, root_config=root_config,
type_name=pkg_type)
metadata = pkg.metadata
+ if not built:
+ metadata['CHOST'] = pkgsettings.get('CHOST', '')
if not built and ("?" in metadata["LICENSE"] or \
"?" in metadata["PROVIDE"]):
# This is avoided whenever possible because
settings = self.pkgsettings[root_config.root]
settings.setcpv(pkg)
pkg.metadata["USE"] = settings["PORTAGE_USE"]
+ pkg.metadata['CHOST'] = settings.get('CHOST', '')
self._pkg_cache[pkg] = pkg
return pkg
pkgsettings = self.pkgsettings[myroot]
pkgsettings.setcpv(pkg)
pkg.metadata["USE"] = pkgsettings["PORTAGE_USE"]
+ pkg.metadata['CHOST'] = pkgsettings.get('CHOST', '')
self._pkg_cache[pkg] = pkg
root_config = self.roots[pkg.root]
settings = self.pkgsettings[root_config.root]
settings.setcpv(pkg)
pkg.metadata["USE"] = settings["PORTAGE_USE"]
+ pkg.metadata['CHOST'] = settings.get('CHOST', '')
return pkg
ret.append(element)
return ret
- def _accept_chost(self, pkg):
+ def _accept_chost(self, cpv, metadata):
"""
@return True if pkg CHOST is accepted, False otherwise.
"""
self._accept_chost_re = re.compile("^$")
return self._accept_chost_re.match(
- pkg.metadata.get("CHOST", "")) is not None
+ metadata.get('CHOST', '')) is not None
def setinst(self,mycpv,mydbapi):
"""This updates the preferences for old-style virtuals,
aux_keys = list(self._aux_cache_keys)
metadata = {}
local_config = self.mysettings.local_config
+ chost = self.mysettings.get('CHOST', '')
+ accept_chost = self.mysettings._accept_chost
for mycpv in mylist:
metadata.clear()
try:
if self.mysettings._getMissingKeywords(mycpv, metadata):
continue
if local_config:
+ metadata['CHOST'] = chost
+ if not accept_chost(mycpv, metadata):
+ continue
metadata["USE"] = ""
if "?" in metadata["LICENSE"]:
self.doebuild_settings.setcpv(mycpv, mydb=metadata)