Explorar o código

* apt-pkg/depcache.cc:
- never mark required packages as garbage

Michael Vogt %!s(int64=20) %!d(string=hai) anos
pai
achega
c9b320e8c7
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      apt-pkg/depcache.cc

+ 5 - 0
apt-pkg/depcache.cc

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