diff options
author | Michael Vogt <mvo@debian.org> | 2013-10-05 10:49:34 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-10-05 10:49:34 +0200 |
commit | 0fa3c89c9e5c2c61a70c714ef8e4ac9d2b7d6ae1 (patch) | |
tree | 54a79b695d236233a3f1db0f097b646adb858208 /apt-pkg/depcache.cc | |
parent | b821e492d6dc4e1e8fd1f83590e12e3fbccad717 (diff) | |
parent | be297c7ab3c16edcbdd6afc699c73a58e545b599 (diff) |
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r-- | apt-pkg/depcache.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 978a893f7..a06789cdf 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -896,6 +896,7 @@ char const* PrintMode(char const mode) case pkgDepCache::ModeInstall: return "Install"; case pkgDepCache::ModeKeep: return "Keep"; case pkgDepCache::ModeDelete: return "Delete"; + case pkgDepCache::ModeGarbage: return "Garbage"; default: return "UNKNOWN"; } } @@ -1726,8 +1727,6 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) follow_recommends = MarkFollowsRecommends(); follow_suggests = MarkFollowsSuggests(); - - // do the mark part, this is the core bit of the algorithm for(PkgIterator p = PkgBegin(); !p.end(); ++p) { @@ -1738,7 +1737,9 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc) // 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)) + p.CurrentVer()->Priority == pkgCache::State::Required) || + // packages which can't be changed (like holds) can't be garbage + (IsModeChangeOk(ModeGarbage, p, 0, false) == false)) { // the package is installed (and set to keep) if(PkgState[p->ID].Keep() && !p.CurrentVer().end()) |