From 25bd9fa173fe07a709df4fd7eba1d5d49834a747 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 7 Nov 2007 23:54:15 +0000 Subject: [PATCH] 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 --- pym/_emerge/__init__.py | 12 ++++++++++++ pym/portage/__init__.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) 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() -- 2.26.2