diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-09 13:55:23 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-09 13:55:23 +0100 |
| commit | 6c112f9860c1730237029f4e23d40bf658d73704 (patch) | |
| tree | 8f5f98fbe27ac7060b38e545eb43317215f1ae89 /apt-private | |
| parent | 935a9ab334e55a29363f45e7de6338c47337e806 (diff) | |
Print --solver 3.0 explanation if both internal and it failed
This can provide useful additional context.
To avoid updating the whole test suite for it, introduce a new
option `quiet::NoSolver3Explanation` and set it by default. All
the other tests that assert output will already have matching
tests for --solver 3.0 with the correct messages asserted, it
makes no sense to duplicate them.
Diffstat (limited to 'apt-private')
| -rw-r--r-- | apt-private/private-install.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index cb9f93e9e..29e23a57e 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -1024,6 +1024,9 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg transaction.temporaryRollback(); // Rollback to before internal solver made changes so we can dump the OG request WriteApportReport(Cache, error, errors, UpgradeMode, distUpgradeMode); } + + if (not res && not errors.empty() && not _config->FindB("quiet::NoSolver3Explanation", false)) + _error->Error("The following information from --solver 3.0 may provide additional context:\n%s", APT::String::Join(errors, "\n").c_str()); } // If the 3.0 solver could not recover either, abort. _error->MergeWithStack(); |
