summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-10-07 10:26:11 +0000
committerJulian Andres Klode <jak@debian.org>2025-10-07 10:26:11 +0000
commit86be82f9877e29cb27de98c8680026df28e99af4 (patch)
tree7a510b2eb336a12f141d7320a4b17938270040b9
parent8066395be320ea253d9d973bb55abeb5b4e1e3b2 (diff)
parentf17371c879bd4eedb0fee56ded4bc8a9b766c8e3 (diff)
Merge branch 'build-dep_mark-auto' into 'main'
Let APT::Get::Mark-Auto satisfy APT::Get::Build-Dep-Automatic See merge request apt-team/apt!514
-rw-r--r--apt-private/private-source.cc2
-rwxr-xr-xtest/integration/test-bug-720597-build-dep-purge9
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