For bug #161356, fix error handling for currupt ebuilds. (trunk 5735:5737)
authorZac Medico <zmedico@gentoo.org>
Sat, 20 Jan 2007 20:12:31 +0000 (20:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 20 Jan 2007 20:12:31 +0000 (20:12 -0000)
svn path=/main/branches/2.1.2/; revision=5738

bin/emerge
pym/portage.py

index bd0e58b420266ee9b50db646da4c284d45c8dbc2..d2894cc15d236cd7a6ae70c9c6760f1850d7b94e 100755 (executable)
@@ -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:
index 542f3ae86d7277e2919c555d90ebfb21ddf34df6..a4855269c806bdfc6922af1a0f7b9a0b152bd3ce 100644 (file)
@@ -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: