]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/depcache.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 18 Dec 2006 10:55:43 +0000 (11:55 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 18 Dec 2006 10:55:43 +0000 (11:55 +0100)
  - never mark required packages as garbage

apt-pkg/depcache.cc

index 2bae94026933167b32caf0ad5adfce4be3d89c31..3dc9bda35838d4962a18b77d449ee3bf66c5d5f1 100644 (file)
@@ -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()))
      {