aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 22:03:52 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 22:05:31 +0000
commit7f22734f30ff26dc49ccbb041070356d3c59d9fe (patch)
tree4fe283af5b9c004841237bdc1ab60239757e1996
parentc5a39caef178bd7ee0cd187ff8671b8e391e234e (diff)
downloadpaludis-7f22734f30ff26dc49ccbb041070356d3c59d9fe.tar.gz
paludis-7f22734f30ff26dc49ccbb041070356d3c59d9fe.tar.xz
Abort if we restart too often
-rw-r--r--src/clients/cave/resolve_common.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index b8db984..b7eb14f 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -1242,6 +1242,11 @@ paludis::cave::resolve_common(
env.get(), resolution_options, e.resolvent()))).first->second->add(
e.suggested_preset());
resolver = make_shared_ptr(new Resolver(env.get(), resolver_functions));
+
+ if (restarts.size() > 9000)
+ throw InternalError(PALUDIS_HERE, "Restarted over nine thousand times. Something's "
+ "probably gone horribly wrong. Consider using --dump-restarts and having "
+ "a look.");
}
}
}