]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
* apt-pkg/depcache.cc:
[apt.git] / apt-pkg / depcache.cc
index 1e4771dda35f242a159431803ffd0aeb18a6465c..390d93dc8db7b1ae5305c9cc00a295d523f9783d 100644 (file)
@@ -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()))
      {