For unsatisfied dependencies, shorten the per-package EAPI mask
authorZac Medico <zmedico@gentoo.org>
Wed, 7 Nov 2007 23:54:15 +0000 (23:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 7 Nov 2007 23:54:15 +0000 (23:54 -0000)
output and show an informative message whenever an EAPI mask is
encountered.

svn path=/main/trunk/; revision=8457

pym/_emerge/__init__.py
pym/portage/__init__.py

index e3cad61ce1c419b61ef8b4d1abdcb4f884b76bc4..5ac9de0e8a25266ed7f83ac9817e40fe4a4b39ae 100644 (file)
@@ -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."
index 2f01fe221a6e651f3e20c2c9f01369f6dbad5821..12f8eaf253fa59c84a960bd9bdf3f662f7b3c023 100644 (file)
@@ -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()