From: Zac Medico Date: Fri, 5 Oct 2007 03:05:50 +0000 (-0000) Subject: Add EAPI masking support for binary packages. (trunk r7913) X-Git-Tag: v2.1.3.16~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=315f0b1d3edd8713f771e068b4578c313058e807;p=portage.git Add EAPI masking support for binary packages. (trunk r7913) svn path=/main/branches/2.1.2/; revision=7935 --- 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):