Fix dep_zapdeps() to handle satisfied or optional builttime deps
authorZac Medico <zmedico@gentoo.org>
Wed, 8 Sep 2010 20:35:16 +0000 (13:35 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 8 Sep 2010 20:35:16 +0000 (13:35 -0700)
appropriately.

pym/portage/dep/dep_check.py

index cdedf7920c6833af250b5718860f0f34eb57ad30..fca1594a7fe5488c68a7cfc7b9a1745a313b7cdc 100644 (file)
@@ -383,7 +383,8 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                                if all_in_graph:
                                        if parent is None or priority is None:
                                                pass
-                                       elif priority.buildtime:
+                                       elif priority.buildtime and \
+                                               not (priority.satisfied or priority.optional):
                                                # Check if the atom would result in a direct circular
                                                # dependency and try to avoid that if it seems likely
                                                # to be unresolvable. This is only relevant for