summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-04 00:47:00 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-04 00:47:00 +0000
commit783c3966752cb73cb3a339119a388061c97ae1ea (patch)
tree47c13477198c318d465dcfff3034639fcc15126d
parent8e24d26625f3ecd5ecef6ad82e81dbb75114a456 (diff)
downloadportage-783c3966752cb73cb3a339119a388061c97ae1ea.tar.gz
portage-783c3966752cb73cb3a339119a388061c97ae1ea.tar.bz2
portage-783c3966752cb73cb3a339119a388061c97ae1ea.zip
When portdbapi.aux_get() generates a KeyError in portage.getmaskingstatus(), handle it by reporting "corruption".
svn path=/main/trunk/; revision=5166
-rw-r--r--pym/portage.py7
1 files changed, 6 insertions, 1 deletions
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()