diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-05 03:05:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-05 03:05:50 +0000 |
commit | 315f0b1d3edd8713f771e068b4578c313058e807 (patch) | |
tree | c36e7f022d604dd3ff286a715fe7f404e016e690 /bin/emerge | |
parent | 3398f914dcbf7f49439616b9ac9d3fd72f500bf3 (diff) | |
download | portage-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
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 23 |
1 files changed, 19 insertions, 4 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." |