+ IsEssential = true;
+
+ /* Check for packages that are the dependents of essential packages and
+ promote them too */
+ if (Pkg->CurrentVer != 0)
+ {
+ 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)
+ IsEssential = true;
+ }
+
+ if (IsEssential == true)