X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6ca714d55119e87a01bd475abd08e7212dcafbd0..c04a8d16e28bc82a76a31dba23244390a76fbcbb:/apt-pkg/depcache.cc diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 1e4771dda..390d93dc8 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1345,6 +1345,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())) {