diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-05 03:27:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-05 03:27:30 +0000 |
commit | ee8a242c4982d1254c29681061548ea343d51a28 (patch) | |
tree | fd33cce2604d52119e7739050f0cf518e280a2fa /pym/_emerge/__init__.py | |
parent | 1fb97c20304c242dd9a8069b3ff351c672dfd78a (diff) | |
download | portage-ee8a242c4982d1254c29681061548ea343d51a28.tar.gz portage-ee8a242c4982d1254c29681061548ea343d51a28.tar.bz2 portage-ee8a242c4982d1254c29681061548ea343d51a28.zip |
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.
svn path=/main/trunk/; revision=10188
Diffstat (limited to 'pym/_emerge/__init__.py')
-rw-r--r-- | pym/_emerge/__init__.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 127a73e65..3b7842f66 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1793,6 +1793,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() @@ -3174,10 +3176,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) @@ -3309,6 +3318,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 @@ -3383,6 +3393,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) |