Przeglądaj źródła

* apt-pkg/depcache.cc:
- never autoremove Required packages

Michael Vogt 19 lat temu
rodzic
commit
c04a8d16e2
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      apt-pkg/depcache.cc

+ 5 - 0
apt-pkg/depcache.cc

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