When portdbapi.aux_get() generates a KeyError in portage.getmaskingstatus(), handle...
authorZac Medico <zmedico@gentoo.org>
Mon, 4 Dec 2006 00:47:00 +0000 (00:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 4 Dec 2006 00:47:00 +0000 (00:47 -0000)
svn path=/main/trunk/; revision=5166

pym/portage.py

index 5dbd3a7f8090f0bae691c6b0fbf180f563c7f865..dbfe5605bb3e57322262bef79a4344d95b573698 100644 (file)
@@ -4128,7 +4128,12 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
                                        rValue.append("package.mask")
 
        # keywords checking
-       mygroups, eapi = portdb.aux_get(mycpv, ["KEYWORDS", "EAPI"])
+       try:
+               mygroups, eapi = portdb.aux_get(mycpv, ["KEYWORDS", "EAPI"])
+       except KeyError:
+               # The "depend" phase apparently failed for some reason.  An associated
+               # error message will have already been printed to stderr.
+               return ["corruption"]
        if not eapi_is_supported(eapi):
                return ["required EAPI %s, supported EAPI %s" % (eapi, portage_const.EAPI)]
        mygroups = mygroups.split()