diff options
| author | Jochen Sprickerhof <jspricke@debian.org> | 2025-09-16 08:29:39 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-10-07 10:25:20 +0000 |
| commit | f17371c879bd4eedb0fee56ded4bc8a9b766c8e3 (patch) | |
| tree | 7a510b2eb336a12f141d7320a4b17938270040b9 | |
| parent | 8066395be320ea253d9d973bb55abeb5b4e1e3b2 (diff) | |
Let APT::Get::Mark-Auto satisfy APT::Get::Build-Dep-Automatic
This allows:
apt build-dep --mark-auto apt
Closes: #973260
| -rw-r--r-- | apt-private/private-source.cc | 2 | ||||
| -rwxr-xr-x | test/integration/test-bug-720597-build-dep-purge | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc index ac52de9e9..ebd3a980c 100644 --- a/apt-private/private-source.cc +++ b/apt-private/private-source.cc @@ -864,7 +864,7 @@ bool DoBuildDep(CommandLine &CmdL) return false; { - if (_config->FindB(AreDoingSatisfy ? "APT::Get::Satisfy-Automatic" : "APT::Get::Build-Dep-Automatic", false) == false) + if (_config->FindB(AreDoingSatisfy ? "APT::Get::Satisfy-Automatic" : "APT::Get::Build-Dep-Automatic", false) == false && _config->FindB("APT::Get::Mark-Auto", false) == false) { for (auto const &pkg: removeAgain) { diff --git a/test/integration/test-bug-720597-build-dep-purge b/test/integration/test-bug-720597-build-dep-purge index 9ff0d23f4..2e0186596 100755 --- a/test/integration/test-bug-720597-build-dep-purge +++ b/test/integration/test-bug-720597-build-dep-purge @@ -64,3 +64,12 @@ The following packages will be REMOVED: pkgb 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. Remv pkgb [1]' apt autoremove -s +testsuccess apt purge pkgb pkgc -y +testsuccess apt build-dep pkgc -y --mark-auto +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + pkgb +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv pkgb [1]' apt autoremove -s |
