Fix Scheduler._find_system_deps() so that it only traverses runtime deps.
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 03:39:50 +0000 (03:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 03:39:50 +0000 (03:39 -0000)
(trunk r12581)

svn path=/main/branches/2.1.6/; revision=12862

pym/_emerge/__init__.py

index d4a4d81341f63bc87488ebfc4ff4f44584d2bf78..95409e3729e84729f62700b6b9c36d543ed6a5c5 100644 (file)
@@ -9975,14 +9975,21 @@ class Scheduler(PollScheduler):
                        if system_set.findAtomForPackage(node):
                                node_stack.append(node)
 
+               def ignore_priority(priority):
+                       """
+                       Ignore non-runtime priorities.
+                       """
+                       if isinstance(priority, DepPriority) and \
+                               (priority.runtime or priority.runtime_post):
+                               return False
+                       return True
+
                while node_stack:
                        node = node_stack.pop()
                        if node in deep_system_deps:
                                continue
                        deep_system_deps.add(node)
-                       # TODO: Only traverse runtime deps since we aren't concerned about
-                       # buildtime deps here.
-                       for child in graph.child_nodes(node):
+                       for child in graph.child_nodes(node, ignore_priority=ignore_priority):
                                if not isinstance(child, Package) or \
                                        child.operation == "uninstall":
                                        continue