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
- if not pkg.installed and \
- pkgsettings._getMissingKeywords(pkg.cpv, pkg.metadata):
+ eapi = pkg.metadata["EAPI"]
+ if not portage.eapi_is_supported(eapi):
return False
+ if not pkg.installed:
+ if portage._eapi_is_deprecated(eapi):
+ return False
+ if pkgsettings._getMissingKeywords(pkg.cpv, pkg.metadata):
+ return False
if pkgsettings._getMaskAtom(pkg.cpv, pkg.metadata):
return False
if pkgsettings._getProfileMaskAtom(pkg.cpv, pkg.metadata):
eerror(l, phase=mydo, key=mysettings.mycpv)
return rval
+_deprecated_eapis = frozenset(["2_pre3", "2_pre2", "2_pre1"])
+
+def _eapi_is_deprecated(eapi):
+ return eapi in _deprecated_eapis
+
def eapi_is_supported(eapi):
eapi = str(eapi).strip()
- if eapi in ("2_pre3", "2_pre2", "2_pre1"):
+ if _eapi_is_deprecated(eapi):
return True
try:
eapi = eapi[1:]
if not eapi_is_supported(eapi):
return ["EAPI %s" % eapi]
+ elif _eapi_is_deprecated(eapi) and not installed:
+ return ["EAPI %s" % eapi]
egroups = settings.configdict["backupenv"].get(
"ACCEPT_KEYWORDS", "").split()
mygroups = mygroups.split()
import portage.gpg, portage.checksum
from portage import eclass_cache, auxdbkeys, doebuild, flatten, \
- listdir, dep_expand, eapi_is_supported, key_expand, dep_check
+ listdir, dep_expand, eapi_is_supported, key_expand, dep_check, \
+ _eapi_is_deprecated
import os, stat
from itertools import izip
writemsg("!!! %s\n" % str(e), noiselevel=-1)
del e
continue
- if not eapi_is_supported(metadata["EAPI"]):
+ eapi = metadata["EAPI"]
+ if not eapi_is_supported(eapi):
+ continue
+ if _eapi_is_deprecated(eapi):
continue
if self.mysettings._getMissingKeywords(mycpv, metadata):
continue