diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:39:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:39:50 +0000 |
commit | 861b535aeadc3ebd0282e3e77cc04e62212e9b00 (patch) | |
tree | 935546a0226be402489d97f982a44ae2cbcb0ed9 /pym | |
parent | 310db5c0b9d9ea6e30c0f55b023aab5d6936cb24 (diff) | |
download | portage-861b535aeadc3ebd0282e3e77cc04e62212e9b00.tar.gz portage-861b535aeadc3ebd0282e3e77cc04e62212e9b00.tar.bz2 portage-861b535aeadc3ebd0282e3e77cc04e62212e9b00.zip |
Fix Scheduler._find_system_deps() so that it only traverses runtime deps.
(trunk r12581)
svn path=/main/branches/2.1.6/; revision=12862
Diffstat (limited to 'pym')
-rw-r--r-- | pym/_emerge/__init__.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index d4a4d8134..95409e372 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -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 |