summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-10 19:45:08 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-10 19:45:08 -0700
commitd2403147d289aa34c27b16762e81c362d643b555 (patch)
tree18961999800a83f4497830dcc2135bafcbd083f2
parent796d15114b331a11a8528516739f093cdcb6ff6c (diff)
downloadportage-d2403147d289aa34c27b16762e81c362d643b555.tar.gz
portage-d2403147d289aa34c27b16762e81c362d643b555.tar.bz2
portage-d2403147d289aa34c27b16762e81c362d643b555.zip
depgraph._serialize_tasks: tweak last commit
This code is only intended when more than one node is selected.
-rw-r--r--pym/_emerge/depgraph.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index fab10eb02..13152a7ee 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5035,13 +5035,15 @@ class depgraph(object):
# cycle that is obviously sub-optimal. This will be
# obvious if any of selected_nodes is a leaf node
# when medium_soft deps are ignored.
- for node in selected_nodes:
- if not mygraph.child_nodes(node, ignore_priority =
- DepPriorityNormalRange.ignore_medium_soft):
- prefer_asap = False
- break
- if not prefer_asap:
- continue
+ if len(selected_nodes) > 1:
+ for node in selected_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