From 3a2ab616594cdef440d268bea1f26df7f149d109 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 20 Jan 2007 20:12:31 +0000 Subject: For bug #161356, fix error handling for currupt ebuilds. (trunk 5735:5737) svn path=/main/branches/2.1.2/; revision=5738 --- bin/emerge | 2 +- pym/portage.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/emerge b/bin/emerge index bd0e58b42..d2894cc15 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1461,7 +1461,7 @@ class depgraph: raise # Needed else can't exit except Exception, e: print >> sys.stderr, "\n\n!!! Problem in '%s' dependencies." % mykey - print >> sys.stderr, "!!!", str(e), e.__module__ + print >> sys.stderr, "!!!", str(e), getattr(e, "__module__", None) raise if not self.mysd: diff --git a/pym/portage.py b/pym/portage.py index 542f3ae86..a4855269c 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6036,8 +6036,14 @@ class portdbapi(dbapi): raise KeyError myslot = portage_dep.dep_getslot(mydep) if myslot is not None: - myval = [cpv for cpv in myval \ - if self.aux_get(cpv, ["SLOT"])[0] == myslot] + slotmatches = [] + for cpv in myval: + try: + if self.aux_get(cpv, ["SLOT"])[0] == myslot: + slotmatches.append(cpv) + except KeyError: + pass # ebuild masked by corruption + myval = slotmatches if self.frozen and (level not in ["match-list","bestmatch-list"]): self.xcache[level][mydep]=myval if origdep and origdep != mydep: -- cgit v1.2.3-1-g7c22