+// ProblemResolver::Resolve - calls a resolver to fix the situation /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool pkgProblemResolver::Resolve(bool BrokenFix)
+{
+ std::string const solver = _config->Find("APT::Solver::Name", "internal");
+
+ if (solver != "internal")
+ {
+ int solver_in, solver_out;
+ if (EDSP::ExecuteSolver(solver.c_str(), &solver_in, &solver_out) == false)
+ return false;
+
+ FILE* output = fdopen(solver_in, "w");
+ if (output == NULL)
+ return _error->Errno("Resolve", "fdopen on solver stdin failed");
+ EDSP::WriteRequest(Cache, output);
+ EDSP::WriteScenario(Cache, output);
+ fclose(output);
+
+ if (EDSP::ReadResponse(solver_out, Cache) == false)
+ return _error->Error("Reading solver response failed");
+
+ return true;
+ }
+ return ResolveInternal(BrokenFix);
+}
+ /*}}}*/
+// ProblemResolver::ResolveInternal - Run the resolution pass /*{{{*/