]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/depcache.cc:
authorMichael Vogt <egon@bottom>
Mon, 18 Dec 2006 11:15:31 +0000 (12:15 +0100)
committerMichael Vogt <egon@bottom>
Mon, 18 Dec 2006 11:15:31 +0000 (12:15 +0100)
  - never autoremove Required packages

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()))
      {