diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2024-09-05 14:58:50 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-11-11 12:30:01 +0100 |
| commit | 2f5aab4afaa61ec9b9c690dea4a0b7d650bb2374 (patch) | |
| tree | ae25c5fc3b1433aa44304aa7bf7670f322b6697e /apt-pkg | |
| parent | 49d3d6b2c3dbc0d30e46131dd288f4e106ea2fe6 (diff) | |
Return an error if ResolveByKeep() is unsuccessful
In case of held packages or packages that otherwise can't be kept
back, we should return an error and not require the client to check
the broken_count after calling us.
LP: #2078720
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/algorithms.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 6131ecd11..72184748a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1423,6 +1423,9 @@ bool pkgProblemResolver::ResolveByKeepInternal() delete[] PList; + if (Cache.BrokenCount() != 0) + return _error->Error(_("Unable to correct problems, you have held broken packages.")); + if (Debug) Cache.CheckConsistency("keep done"); |
