Cache blocked slots for better efficiency.
authorZac Medico <zmedico@gentoo.org>
Thu, 14 Dec 2006 20:42:33 +0000 (20:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 14 Dec 2006 20:42:33 +0000 (20:42 -0000)
svn path=/main/trunk/; revision=5296

bin/emerge

index 646aada405a3bd0a57d47e57256a8cd478b09cc4..020682894408ffeb5f71af9a0b7a4b82959adb9a 100755 (executable)
@@ -1626,6 +1626,7 @@ class depgraph:
                                blocked_slots_final[cpv] = \
                                        "%s:%s" % (portage.dep_getkey(cpv),
                                                final_db.aux_get(cpv, ["SLOT"])[0])
+                       blocked_slots_final_values = set(blocked_slots_final.itervalues())
                        for parent in list(self.blocker_parents[blocker]):
                                ptype, proot, pcpv, pstatus = parent
                                pdbapi = self.trees[proot][self.pkg_tree_map[ptype]].dbapi
@@ -1648,7 +1649,7 @@ class depgraph:
                                                # merge of either package is triggered.
                                                continue
                                        if pstatus == "merge" and \
-                                               slot_atom not in blocked_slots_final.values():
+                                               slot_atom not in blocked_slots_final_values:
                                                upgrade_matches = final_db.match(slot_atom)
                                                if upgrade_matches:
                                                        # Apparently an upgrade may be able to invalidate