]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
El Te Dee Patch
[apt.git] / apt-pkg / algorithms.cc
index e784ce895babf6a1c2fee8bc29b49e98ac13153a..adcbbd40c31f307cef5f55e7470c514005781dd9 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: algorithms.cc,v 1.27 1999/10/22 05:58:54 jgg Exp $
+// $Id: algorithms.cc,v 1.30 2000/05/10 05:56:23 jgg Exp $
 /* ######################################################################
 
    Algorithms - A set of misc algorithms
@@ -284,7 +284,7 @@ bool pkgDistUpgrade(pkgDepCache &Cache)
    pkgProblemResolver Fix(Cache);
 
    // Hold back held packages.
-   if (_config->FindB("APT::Ingore-Hold",false) == false)
+   if (_config->FindB("APT::Ignore-Hold",false) == false)
    {
       for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
       {
@@ -738,7 +738,10 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
               if (InOr == true)
               {
                  if (OldEnd == LEnd && OrOp == OrRemove)
-                    Cache.MarkDelete(I);
+                 {
+                    if ((Flags[I->ID] & Protected) != Protected)
+                       Cache.MarkDelete(I);
+                 }               
                  if (OldEnd == LEnd && OrOp == OrKeep)
                     Cache.MarkKeep(I);
               }
@@ -799,7 +802,11 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
                  if ((Flags[I->ID] & Protected) == Protected)
                  {
                     if (DoUpgrade(Pkg) == true)
+                    {
                        Scores[Pkg->ID] = Scores[I->ID];
+                       break;
+                    }
+                    
                     continue;
                  }