diff options
| -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 |
