diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-06-10 20:58:38 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-06-10 20:58:38 -0700 |
commit | 075ce106b3ae1e55cc810b4c946deea83bcb4a8e (patch) | |
tree | 09e0ab2ec3a3b09d26e683fea9f6c8b1ede08e7f | |
parent | 4f58705b07a948d216eba18013af483f63d34a26 (diff) | |
download | portage-075ce106b3ae1e55cc810b4c946deea83bcb4a8e.tar.gz portage-075ce106b3ae1e55cc810b4c946deea83bcb4a8e.tar.bz2 portage-075ce106b3ae1e55cc810b4c946deea83bcb4a8e.zip |
depgraph._serialize_tasks: move libperl/perl code
This ensures that all asap_nodes are explored before setting
prefer_asap to False.
-rw-r--r-- | pym/_emerge/depgraph.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index baa40c425..ca86904e6 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5019,7 +5019,23 @@ class depgraph(object): selected_nodes = set() if gather_deps(ignore_priority, mergeable_nodes, selected_nodes, node): - break + # When selecting asap_nodes, we need to ensure + # that we don't selected a large runtime cycle + # that is obviously sub-optimal. This will be + # obvious if any of the non-asap selected_nodes + # is a leaf node when medium_soft deps are + # ignored. + if prefer_asap and asap_nodes and \ + len(selected_nodes) > 1: + for node in selected_nodes.difference( + asap_nodes): + if not mygraph.child_nodes(node, + ignore_priority = + DepPriorityNormalRange.ignore_medium_soft): + selected_nodes = None + break + if selected_nodes: + break else: selected_nodes = None if selected_nodes: @@ -5031,19 +5047,6 @@ class depgraph(object): # so ignore them for the next iteration. prefer_asap = False continue - # Make sure that we haven't selected a large runtime - # cycle that is obviously sub-optimal. This will be - # obvious if any of the non-asap selected_nodes is - # a leaf node when medium_soft deps are ignored. - if len(selected_nodes) > 1: - for node in selected_nodes.difference(asap_nodes): - if not mygraph.child_nodes(node, - ignore_priority = - DepPriorityNormalRange.ignore_medium_soft): - prefer_asap = False - break - if not prefer_asap: - continue if selected_nodes and ignore_priority is not None: # Try to merge ignored medium_soft deps as soon as possible |