From: Michael Vogt Date: Mon, 18 Dec 2006 10:55:43 +0000 (+0100) Subject: * apt-pkg/depcache.cc: X-Git-Tag: 0.7.24ubuntu1~211^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c9b320e8c7c37b47aac3c8af6be990c4cded04c9?hp=-c * apt-pkg/depcache.cc: - never mark required packages as garbage --- c9b320e8c7c37b47aac3c8af6be990c4cded04c9 diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 2bae94026..3dc9bda35 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1273,6 +1273,11 @@ bool pkgDepCache::Sweep() { StateCache &state=PkgState[p->ID]; + // skip required packages + if (!p.CurrentVer().end() && + (p.CurrentVer()->Priority == pkgCache::State::Required)) + continue; + // if it is not marked and it is installed, it's garbage if(!state.Marked && (!p.CurrentVer().end() || state.Install())) {