diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-10 19:56:16 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-14 19:04:56 +0100 |
| commit | a9587b39ea6776b1d1324288786176102f65cee5 (patch) | |
| tree | d475c30cddec0d15343a3fab9a5ed9b3a1fbe402 /apt-pkg/solver3.h | |
| parent | 222271ee0d44c8e7bc00935fbbc2615529a4cdfc (diff) | |
solver3: Implement a timeout, default 10s
A SAT solver can run more or less forever, but that's not a good
user experience.
Diffstat (limited to 'apt-pkg/solver3.h')
| -rw-r--r-- | apt-pkg/solver3.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index 34da03ea0..da75179d5 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -213,6 +213,9 @@ class Solver // This is an index into the solved vector. std::vector<depth_type> choices{}; + // \brief The time we called Solve() + time_t startTime; + /// Various configuration options // \brief Debug level int debug{_config->FindI("Debug::APT::Solver")}; @@ -232,6 +235,8 @@ class Solver bool FixPolicyBroken{_config->FindB("APT::Get::Fix-Policy-Broken")}; // \brief If set, we use strict pinning. bool DeferVersionSelection{_config->FindB("APT::Solver::Defer-Version-Selection", true)}; + // \brief If set, we use strict pinning. + int Timeout{_config->FindI("APT::Solver::Timeout", 10)}; // \brief Discover a variable, translating the underlying dependencies to the SAT presentation // |
