diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-18 01:27:18 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-18 01:27:18 -0700 |
commit | 6783d61bb66371bf1be62b55a19d1b954b54418c (patch) | |
tree | 2ae9bb84e948b09584fbc925b77bd2eb68241003 | |
parent | b6b26a099d6b618170370b7f3012451374c9b7f4 (diff) | |
download | portage-6783d61bb66371bf1be62b55a19d1b954b54418c.tar.gz portage-6783d61bb66371bf1be62b55a19d1b954b54418c.tar.bz2 portage-6783d61bb66371bf1be62b55a19d1b954b54418c.zip |
Fix --autounmask get_dep_chain() function to traverse nested sets.
-rw-r--r-- | pym/_emerge/depgraph.py | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 3c8d41eb4..fd33beb2a 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5407,7 +5407,13 @@ class depgraph(object): all_parents = self._dynamic_config._parent_atoms while node is not None: traversed_nodes.add(node) - if node is not pkg: + if isinstance(node, DependencyArg): + if first: + first = False + else: + msg += ", " + msg += _unicode_decode('required by %s') % (node,) + elif node is not pkg: for ppkg, patom in all_parents[child]: if ppkg == node: atom = patom.unevaluated_atom @@ -5457,15 +5463,22 @@ class depgraph(object): # package twice, in order to prevent an infinite loop. selected_parent = None for parent in self._dynamic_config.digraph.parent_nodes(node): + if parent in traversed_nodes: + continue if isinstance(parent, DependencyArg): - if first: - first = False + if self._dynamic_config.digraph.parent_nodes(parent): + selected_parent = parent + child = node else: - msg += ", " - msg += 'required by %s (argument)' % str(parent) - selected_parent = None + if first: + first = False + else: + msg += ", " + msg += _unicode_decode( + 'required by %s (argument)') % (parent,) + selected_parent = None break - if parent not in traversed_nodes: + else: selected_parent = parent child = node node = selected_parent |