summaryrefslogtreecommitdiff
path: root/src/cmdline/cmdline_resolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmdline/cmdline_resolver.cc')
-rw-r--r--src/cmdline/cmdline_resolver.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cmdline/cmdline_resolver.cc b/src/cmdline/cmdline_resolver.cc
index e124a91d..2cb70099 100644
--- a/src/cmdline/cmdline_resolver.cc
+++ b/src/cmdline/cmdline_resolver.cc
@@ -478,6 +478,14 @@ aptitude_solution calculate_current_solution()
if(resman->get_selected_solution() < resman->generated_solution_count())
return resman->get_solution(resman->get_selected_solution(), 0);
+ const int step_limit = aptcfg->FindI(PACKAGE "::ProblemResolver::StepLimit", 5000);
+ if(step_limit == 0)
+ {
+ const std::string msg = ssprintf(_("Would resolve dependencies, but dependency resolution is disabled.\n (%s::ProblemResolver::StepLimit = 0)\n"), PACKAGE);
+
+ throw CmdlineSearchAbortedException(msg);
+ }
+
cmdline_spinner spin(aptcfg->FindI("Quiet", 0));
@@ -486,7 +494,7 @@ aptitude_solution calculate_current_solution()
cwidget::threads::box<cmdline_resolver_continuation::resolver_result> retbox;
resman->get_solution_background(resman->generated_solution_count(),
- aptcfg->FindI(PACKAGE "::ProblemResolver::StepLimit", 5000),
+ step_limit,
new cmdline_resolver_continuation(retbox));
cmdline_resolver_continuation::resolver_result res;