summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-09-19 10:16:26 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-09-19 10:37:55 +0200
commit8a54113d450140bd6b158cb05473cacca859a54d (patch)
treeda98535a1604e8a39060a775896cf434ba7820c6 /apt-pkg
parentb9127ca07c37288f16b1fdc267d3f106721ed301 (diff)
Pass --abort-after=1 to dpkg when using --force-depends
Using --force-depends causes dpkg to continue removing packages a package depends upon even if that package fails to be removed, because dpkg turns off all sanity checks. So we gotta tell dpkg to stop immediately if there's an error removing stuff. Closes: #935910 LP: #1844634
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 4de36d528..0b807d668 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1775,6 +1775,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
case Item::Remove:
case Item::Purge:
ADDARGC("--force-depends");
+ ADDARGC("--abort-after=1");
if (std::any_of(I, J, ItemIsEssential))
{
ADDARGC("--force-remove-essential");