summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 4eb539579..d8e9621a4 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -486,7 +486,8 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg)
// Essential packages get special treatment
bool IsEssential = false;
- if ((Pkg->Flags & pkgCache::Flag::Essential) != 0)
+ if ((Pkg->Flags & pkgCache::Flag::Essential) != 0 ||
+ (Pkg->Flags & pkgCache::Flag::Important) != 0)
IsEssential = true;
/* Check for packages that are the dependents of essential packages and
@@ -496,7 +497,8 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg)
for (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)
+ if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0 ||
+ (D.ParentPkg()->Flags & pkgCache::Flag::Important) != 0)
IsEssential = true;
}