diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-10 18:37:55 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-10 22:33:05 +0100 |
| commit | 1fc8e9eee4d6a81f907b399034f6f82da2e98140 (patch) | |
| tree | 49a6541ac2036bc1775697093769d188f3679a50 /apt-pkg/edsp.cc | |
| parent | 57ed577700784b2f8ed4c2cd52a90ae8ab636677 (diff) | |
edsp: Set Forbid-New-Install/Forbid-Remove: no if other is set
The upgrade code may also set Upgrade: yes, and this sets both to
yes, so `apt upgrade` dumps behave like `apt-get upgrade` ones,
which of course is not intentional.
moo
Diffstat (limited to 'apt-pkg/edsp.cc')
| -rw-r--r-- | apt-pkg/edsp.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index 196f9d307..88569d3c4 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -373,8 +373,12 @@ bool EDSP::WriteRequest(pkgDepCache &Cache, FileFd &output, } if (flags & Request::FORBID_NEW_INSTALL) WriteOkay(Okay, output, "Forbid-New-Install: yes\n"); + else if (flags & Request::FORBID_REMOVE) + WriteOkay(Okay, output, "Forbid-New-Install: no\n"); if (flags & Request::FORBID_REMOVE) WriteOkay(Okay, output, "Forbid-Remove: yes\n"); + else if (flags & Request::FORBID_NEW_INSTALL) + WriteOkay(Okay, output, "Forbid-Remove: no\n"); auto const solver = _config->Find("APT::Solver", "internal"); WriteOkay(Okay, output, "Solver: ", solver, "\n"); if (_config->FindB("APT::Solver::Strict-Pinning", true) == false) |
