summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-01 23:37:34 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-01 23:37:34 +0000
commitaa45795583bdb772f7ba5808ca76fed12f474ea7 (patch)
tree032fda1c756e1313508d9d2829b2a4a0b5a997f5 /bin
parente9ad7be4e102c375ce10b61f8cc441150dc4a681 (diff)
downloadportage-aa45795583bdb772f7ba5808ca76fed12f474ea7.tar.gz
portage-aa45795583bdb772f7ba5808ca76fed12f474ea7.tar.bz2
portage-aa45795583bdb772f7ba5808ca76fed12f474ea7.zip
Remove the digraph._parent_child_digraph since it's no longer needed. It's
main purpose was to track PDEPEND relationships but those are handled just like the other deps now. (trunk r9675) svn path=/main/branches/2.1.2/; revision=9676
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/emerge b/bin/emerge
index 46893f11f..672c37ff8 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1527,9 +1527,6 @@ class depgraph:
del trees
self.digraph=portage.digraph()
- # Tracks simple parent/child relationships (PDEPEND relationships are
- # not reversed).
- self._parent_child_digraph = digraph()
# contains all sets added to the graph
self._sets = {}
# contains atoms given as arguments
@@ -1582,7 +1579,7 @@ class depgraph:
for node in slot_nodes:
msg.append(indent)
msg.append(str(node))
- parents = self._parent_child_digraph.parent_nodes(node)
+ parents = self.digraph.parent_nodes(node)
if parents:
omitted_parents = 0
if len(parents) > max_parents:
@@ -1705,7 +1702,6 @@ class depgraph:
if existing_node:
if pkg.cpv == existing_node.cpv:
# The existing node can be reused.
- self._parent_child_digraph.add(existing_node, myparent)
# If a direct circular dependency is not an unsatisfied
# buildtime dependency then drop it here since otherwise
# it can skew the merge order calculation in an unwanted
@@ -1773,7 +1769,8 @@ class depgraph:
# Do this even when addme is False (--onlydeps) so that the
# parent/child relationship is always known in case
# self._show_slot_collision_notice() needs to be called later.
- self._parent_child_digraph.add(pkg, myparent)
+ if pkg.onlydeps:
+ self.digraph.add(pkg, myparent)
merging = not (pkg.installed or pkg.onlydeps)
myuse = pkg.metadata["USE"].split()
@@ -3202,7 +3199,7 @@ class depgraph:
tree_nodes = []
display_list = []
- mygraph = self._parent_child_digraph
+ mygraph = self.digraph
i = 0
depth = 0
shown_edges = set()
@@ -3236,6 +3233,8 @@ class depgraph:
selected_parent = None
# First, try to avoid a direct cycle.
for node in parent_nodes:
+ if not isinstance(node, Package):
+ continue
if node not in traversed_nodes and \
node not in child_nodes:
edge = (current_node, node)
@@ -3246,6 +3245,8 @@ class depgraph:
if not selected_parent:
# A direct cycle is unavoidable.
for node in parent_nodes:
+ if not isinstance(node, Package):
+ continue
if node not in traversed_nodes:
edge = (current_node, node)
if edge in shown_edges: