diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2024-05-19 19:32:05 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-05-24 12:48:09 +0200 |
| commit | 4fc6affafafda1aee4cee86294ce7a2b799e2799 (patch) | |
| tree | 24aecb97a2db98e8d425594dba77432ea19c0813 | |
| parent | 140d36fd16a3d4f1fce0c54474b946d0577f1fde (diff) | |
edsp: solver3: Show some progress
Ignore the Solving dependencies... line in the testing framework
for compatibility with the existing test cases.
| -rw-r--r-- | apt-pkg/edsp.cc | 23 | ||||
| -rw-r--r-- | test/integration/framework | 1 |
2 files changed, 17 insertions, 7 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index 589400870..0ffde46c0 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -770,13 +770,22 @@ bool EDSP::ResolveExternal(const char* const solver, pkgDepCache &Cache, { APT::Solver s(Cache.GetCache(), Cache.GetPolicy()); FileFd output; - if (not s.FromDepCache(Cache)) - return false; - if (not s.Solve()) - return false; - if (not s.ToDepCache(Cache)) - return false; - return true; + bool res = true; + if (Progress != NULL) + Progress->OverallProgress(0, 100, 1, _config->FindB("APT::Solver::Upgrade") ? _("Calculating upgrade") : _("Solving dependencies")); + if (res && not s.FromDepCache(Cache)) + res = false; + if (Progress != NULL) + Progress->Progress(10); + if (res && not s.Solve()) + res = false; + if (Progress != NULL) + Progress->Progress(90); + if (res && not s.ToDepCache(Cache)) + res = false; + if (Progress != NULL) + Progress->Done(); + return res; } if (strcmp(solver, "internal") == 0) { diff --git a/test/integration/framework b/test/integration/framework index 98fd7710a..d2ab0d1cd 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1554,6 +1554,7 @@ cleanup_output() { cat "$1" | sed \ -e '/gpgv: WARNING: This key is not suitable for signing in --compliance=gnupg mode/ d' \ -e '/^profiling:/ d' \ + -e '/Solving dependencies\.\.\./ d' \ | sed -e '/\.\.\.profiling:/ {N;s#\.\.\.profiling:.*\n#...#g}' \ >"$2" } |
