diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 3 | ||||
-rw-r--r-- | apt-pkg/packagemanager.cc | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c496538cc..a8f99a855 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1824,6 +1824,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) case Item::Install: ADDARGC("--unpack"); ADDARGC("--auto-deconfigure"); + // dpkg < 1.20.8 needs --force-remove-protected to deconfigure protected packages + if (dpkgProtectedField) + ADDARGC("--force-remove-protected"); break; } diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 0c6998def..ad7612bc3 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -652,8 +652,7 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg, DepIterator const * const D // Essential packages get special treatment bool IsEssential = false; - if ((Pkg->Flags & pkgCache::Flag::Essential) != 0 || - (Pkg->Flags & pkgCache::Flag::Important) != 0) + if ((Pkg->Flags & pkgCache::Flag::Essential) != 0) IsEssential = true; /* Check for packages that are the dependents of essential packages and @@ -663,8 +662,7 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg, DepIterator const * const D for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() == false && IsEssential == false; ++D) if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) - if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0 || - (D.ParentPkg()->Flags & pkgCache::Flag::Important) != 0) + if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0) IsEssential = true; } |