summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2012-03-05 15:12:31 +0100
committerJulian Andres Klode <jak@debian.org>2012-03-05 15:12:31 +0100
commitc520086906f0479d04946f926e3d2dd30df82945 (patch)
treeab56d53dbffb1f12ef0b675803603de3dc6f85f7 /apt-pkg/packagemanager.cc
parentfb805d80bfc6027e2242796dbda306e712cfac09 (diff)
* Treat the Important flag like the Essential flag with two differences:
- No Immediate configuration (see above) - Not automatically installed during dist-upgrade
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;
}