From: Zac Medico Date: Mon, 5 May 2008 03:27:58 +0000 (-0000) Subject: Use a separate digraph to preserve irrelevant blocker relationships that X-Git-Tag: v2.1.5~60 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=21a6ba281ee2acd6a4f9494db4dfef301a8fe97a;p=portage.git Use a separate digraph to preserve irrelevant blocker relationships that are removed from depgraph._blocker_parents since the irrelevant blockers are still needed for the blocker cache. (trunk r10188) svn path=/main/branches/2.1.2/; revision=10189 --- diff --git a/bin/emerge b/bin/emerge index 5556f9368..a476fd9e3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1934,6 +1934,8 @@ class depgraph(object): self._blocker_uninstalls = digraph() # Contains only Package -> Blocker edges self._blocker_parents = digraph() + # Contains only irrelevant Package -> Blocker edges + self._irrelevant_blockers = digraph() # Contains only unsolvable Package -> Blocker edges self._unsolvable_blockers = digraph() self._slot_collision_info = set() @@ -3325,10 +3327,17 @@ class depgraph(object): blocker_atoms = None blockers = None if self.digraph.contains(pkg): + blockers = [] try: - blockers = self._blocker_parents.child_nodes(pkg) + blockers.extend( + self._blocker_parents.child_nodes(pkg)) except KeyError: - blockers = [] + pass + try: + blockers.extend( + self._irrelevant_blockers.child_nodes(pkg)) + except KeyError: + pass if blockers is not None: blockers = set("!" + blocker.atom \ for blocker in blockers) @@ -3460,6 +3469,7 @@ class depgraph(object): self._blocker_parents.remove(blocker) # Discard any parents that don't have any more blockers. for pkg in parent_pkgs: + self._irrelevant_blockers.add(blocker, pkg) if not self._blocker_parents.child_nodes(pkg): self._blocker_parents.remove(pkg) continue @@ -3534,6 +3544,7 @@ class depgraph(object): # merged. self._blocker_uninstalls.addnode(uninst_task, blocker) if not unresolved_blocks and not depends_on_order: + self._irrelevant_blockers.add(blocker, parent) self._blocker_parents.remove_edge(blocker, parent) if not self._blocker_parents.parent_nodes(blocker): self._blocker_parents.remove(blocker)