summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-05 03:05:50 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-05 03:05:50 +0000
commit315f0b1d3edd8713f771e068b4578c313058e807 (patch)
treec36e7f022d604dd3ff286a715fe7f404e016e690
parent3398f914dcbf7f49439616b9ac9d3fd72f500bf3 (diff)
downloadportage-315f0b1d3edd8713f771e068b4578c313058e807.tar.gz
portage-315f0b1d3edd8713f771e068b4578c313058e807.tar.bz2
portage-315f0b1d3edd8713f771e068b4578c313058e807.zip
Add EAPI masking support for binary packages. (trunk r7913)
svn path=/main/branches/2.1.2/; revision=7935
-rwxr-xr-xbin/emerge23
-rw-r--r--pym/portage.py2
2 files changed, 20 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge
index 4909a5f25..af1042c8f 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -43,6 +43,7 @@ bad = create_color_func("BAD")
# white looks bad on terminals with white background
from output import bold as white
+import portage_const
import portage_dep
portage_dep._dep_check_strict = True
import portage_util
@@ -1846,8 +1847,13 @@ class depgraph:
usepkgonly = "--usepkgonly" in self.myopts
chost = pkgsettings["CHOST"]
myeb_pkg_matches = []
+ bindb_keys = ["CHOST","EAPI"]
for pkg in bindb.match(x):
- if chost != bindb.aux_get(pkg, ["CHOST"])[0]:
+ metadata = dict(izip(bindb_keys,
+ bindb.aux_get(pkg, bindb_keys)))
+ if chost != metadata["CHOST"]:
+ continue
+ if not portage.eapi_is_supported(metadata["EAPI"]):
continue
# Remove any binary package entries that are
# masked in the portage tree (#55871).
@@ -1974,11 +1980,20 @@ class depgraph:
alleb = bindb.match(x)
if alleb:
chost = pkgsettings["CHOST"]
+ bindb_keys = ["CHOST","EAPI"]
for p in alleb:
mreasons = []
- pkg_chost = bindb.aux_get(p, ["CHOST"])[0]
- if chost != pkg_chost:
- mreasons.append("CHOST: %s" % pkg_chost)
+ metadata = dict(izip(bindb_keys,
+ bindb.aux_get(pkg, bindb_keys)))
+ if chost != metadata["CHOST"]:
+ mreasons.append("CHOST: %s" % \
+ metadata["CHOST"])
+ if not portage.eapi_is_supported(
+ metadata["EAPI"]):
+ mreasons.append(("required EAPI %s" + \
+ ", supported EAPI %s") % \
+ (metadata["EAPI"],
+ portage_const.EAPI))
print "- "+p+" (masked by: "+", ".join(mreasons)+")"
print "!!! "+red("There are no packages available to satisfy: ")+green(xinfo)
print "!!! Either add a suitable binary package or compile from an ebuild."
diff --git a/pym/portage.py b/pym/portage.py
index dca191dcd..693333b7b 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5304,7 +5304,7 @@ class bindbapi(fakedbapi):
self.settings = settings
self._match_cache = {}
# Selectively cache metadata in order to optimize dep matching.
- self._aux_cache_keys = set(["CHOST","SLOT"])
+ self._aux_cache_keys = set(["CHOST","EAPI","SLOT"])
self._aux_cache = {}
def match(self, *pargs, **kwargs):