summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-05-28 19:04:53 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-05-28 19:04:53 +0200
commit8378913047031bd1433a5b17e9affc1e055a150e (patch)
tree0e0835a408fa7ae1d2ffbd0fbf86e596f2e14159 /apt-pkg
parentd34690e1dc76c1e572d9f7ac172dd6b12059f774 (diff)
* apt-pkg/depcache.cc:
- do the autoremove mark process also for required packages to handle these illegally depending on lower priority packages (Closes: #583517)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/depcache.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index bdb89b5ce..c29114a65 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1638,8 +1638,11 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc)
{
if(!(PkgState[p->ID].Flags & Flag::Auto) ||
(p->Flags & Flag::Essential) ||
- userFunc.InRootSet(p))
-
+ userFunc.InRootSet(p) ||
+ // be nice even then a required package violates the policy (#583517)
+ // and do the full mark process also for required packages
+ (p.CurrentVer().end() != true &&
+ p.CurrentVer()->Priority == pkgCache::State::Required))
{
// the package is installed (and set to keep)
if(PkgState[p->ID].Keep() && !p.CurrentVer().end())