X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/ef19c34816a615365cad8f3a9eda048848dd1470..68acfb437f0c6c2e026be6fd3b7da3fc8d64c523:/apt-pkg/depcache.cc diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 87443f9f3..81e1eeb33 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1324,6 +1324,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())) {