From: Zac Medico Date: Wed, 7 Nov 2007 23:54:15 +0000 (-0000) Subject: For unsatisfied dependencies, shorten the per-package EAPI mask X-Git-Tag: v2.2_pre1~426 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25bd9fa173fe07a709df4fd7eba1d5d49834a747;p=portage.git For unsatisfied dependencies, shorten the per-package EAPI mask output and show an informative message whenever an EAPI mask is encountered. svn path=/main/trunk/; revision=8457 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e3cad61ce..5ac9de0e8 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2076,6 +2076,8 @@ class depgraph(object): red(' [%s]' % myparent[0]) + ')' masked_packages = [] missing_licenses = [] + from textwrap import wrap + have_eapi_mask = False pkgsettings = self.pkgsettings[root] portdb = self.roots[root].trees["porttree"].dbapi dbs = self._filtered_trees[root]["dbs"] @@ -2116,6 +2118,8 @@ class depgraph(object): metadata["CHOST"]) missing_licenses = [] if metadata: + if not portage.eapi_is_supported(metadata["EAPI"]): + have_eapi_mask = True try: missing_licenses = \ pkgsettings.getMissingLicenses( @@ -2152,6 +2156,14 @@ class depgraph(object): print msg print shown_licenses.add(l) + if have_eapi_mask: + print + msg = ("The current version of portage supports " + \ + "EAPI '%s'. You must upgrade to a newer version" + \ + " of portage before EAPI masked packages can" + \ + " be installed.") % portage.const.EAPI + for line in wrap(msg, 75): + print line print print "For more information, see MASKED PACKAGES section in the emerge man page or " print "refer to the Gentoo Handbook." diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2f01fe221..12f8eaf25 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5282,7 +5282,7 @@ def getmaskingstatus(mycpv, metadata=None, settings=None, portdb=None): if eapi.startswith("-"): eapi = eapi[1:] if not eapi_is_supported(eapi): - return ["required EAPI %s, supported EAPI %s" % (eapi, portage.const.EAPI)] + return ["EAPI %s" % eapi] egroups = settings.configdict["backupenv"].get( "ACCEPT_KEYWORDS", "").split() mygroups = mygroups.split()