Fix resume_depgraph() so that it doesn't raise an AssertionError due to
authorZac Medico <zmedico@gentoo.org>
Tue, 22 Jul 2008 06:39:31 +0000 (06:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 22 Jul 2008 06:39:31 +0000 (06:39 -0000)
unsatisfied PDEPEND.

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

pym/_emerge/__init__.py

index aa2cbfdbf266a41a45a992450f840ae1f872701c..9126fa9e0de63b0652c2463cc607691a227ad74c 100644 (file)
@@ -12088,13 +12088,11 @@ def resume_depgraph(settings, trees, mtimedb, myopts, myparams, spinner,
                                if isinstance(x, list) and \
                                tuple(x) not in unsatisfied_parents]
 
-                       # It shouldn't happen, but if the size of mergelist
-                       # does not decrease for some reason then the loop
-                       # will be infinite. Therefore, if that case ever
-                       # occurs for some reason, raise the exception to
-                       # break out of the loop.
+                       # If the mergelist doesn't shrink then this loop is infinite.
                        if len(pruned_mergelist) == len(mergelist):
-                               raise AssertionError("tight loop")
+                               # This happens if a package can't be dropped because
+                               # it's already installed, but it has unsatisfied PDEPEND.
+                               raise
                        mergelist[:] = pruned_mergelist
                        dropped_tasks.update(unsatisfied_parents)
                        del e, graph, traversed_nodes, \