From 783c3966752cb73cb3a339119a388061c97ae1ea Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 4 Dec 2006 00:47:00 +0000 Subject: [PATCH] When portdbapi.aux_get() generates a KeyError in portage.getmaskingstatus(), handle it by reporting "corruption". svn path=/main/trunk/; revision=5166 --- pym/portage.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/portage.py b/pym/portage.py index 5dbd3a7f8..dbfe5605b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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() -- 2.26.2