Allow --keep-going to continue in some cases when a runtime dependency has
authorZac Medico <zmedico@gentoo.org>
Tue, 11 Nov 2008 19:27:51 +0000 (19:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 11 Nov 2008 19:27:51 +0000 (19:27 -0000)
failed to build or install. This involves pruning off the parts of the graph
containing installed packages with unsatisfied dependencies.

svn path=/main/trunk/; revision=11858

pym/_emerge/__init__.py

index f0da0e7e2f21ee9d36cb0d25e86c3ecb4699d04a..c5084ac7b663756f506e6506726839e434e59c68 100644 (file)
@@ -12803,7 +12803,7 @@ def resume_depgraph(settings, trees, mtimedb, myopts, myparams, spinner,
                                # dependency to become unsatisfied.
                                for parent_node in graph.parent_nodes(pkg):
                                        if not isinstance(parent_node, Package) \
-                                               or parent_node.operation != "merge":
+                                               or parent_node.operation not in ("merge", "nomerge"):
                                                continue
                                        unsatisfied = \
                                                graph.child_nodes(parent_node,
@@ -12822,7 +12822,14 @@ def resume_depgraph(settings, trees, mtimedb, myopts, myparams, spinner,
                                # it's already installed, but it has unsatisfied PDEPEND.
                                raise
                        mergelist[:] = pruned_mergelist
-                       dropped_tasks.update(unsatisfied_parents)
+
+                       # Exclude installed packages that have been removed from the graph due
+                       # to failure to build/install runtime dependencies after the dependent
+                       # package has already been installed.
+                       dropped_tasks.update(pkg for pkg in \
+                               unsatisfied_parents if pkg.operation != "nomerge")
+                       mydepgraph.break_refs(unsatisfied_parents)
+
                        del e, graph, traversed_nodes, \
                                unsatisfied_parents, unsatisfied_stack
                        continue