]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/algorithms.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 9 Nov 2012 10:00:02 +0000 (11:00 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 9 Nov 2012 10:00:02 +0000 (11:00 +0100)
  - ensure pkgProblemResolver calls MarkDelete without FromUser set
    so that it can't overrule holds and the protection flag

apt-pkg/algorithms.cc
debian/changelog

index 1b0161ffd9e58b7c637227b0ea68dee24a6395f8..b611df17286bfee5235470ec38efc3599a5e6737 100644 (file)
@@ -287,13 +287,13 @@ bool pkgApplyStatus(pkgDepCache &Cache)
                 Cache[I].CandidateVerIter(Cache).Downloadable() == true)
               Cache.MarkInstall(I, true, 0, false);
            else
-              Cache.MarkDelete(I);
+              Cache.MarkDelete(I, false, 0, false);
         }
         break;
 
         // This means removal failed
         case pkgCache::State::HalfInstalled:
-        Cache.MarkDelete(I);
+        Cache.MarkDelete(I, false, 0, false);
         break;
         
         default:
@@ -774,7 +774,7 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg)
       if (WasKept == true)
         Cache.MarkKeep(Pkg, false, false);
       else
-        Cache.MarkDelete(Pkg);
+        Cache.MarkDelete(Pkg, false, 0, false);
       return false;
    }    
    
@@ -903,7 +903,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
                OldBreaks < Cache.BrokenCount())
            {
               if (OldVer == 0)
-                 Cache.MarkDelete(I);
+                 Cache.MarkDelete(I, false, 0, false);
               else
                  Cache.MarkKeep(I, false, false);
            }       
@@ -942,7 +942,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
                     {
                        if (Debug == true)
                           clog << "  Or group remove for " << I.FullName(false) << endl;
-                       Cache.MarkDelete(I);
+                       Cache.MarkDelete(I, false, 0, false);
                        Change = true;
                     }
                  }
@@ -1077,7 +1077,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
                        {
                           if (Debug == true)
                              clog << "  Removing " << I.FullName(false) << " rather than change " << Start.TargetPkg().FullName(false) << endl;
-                          Cache.MarkDelete(I);
+                          Cache.MarkDelete(I, false, 0, false);
                           if (Counter > 1 && Scores[Pkg->ID] > Scores[I->ID])
                              Scores[I->ID] = Scores[Pkg->ID];
                        }
@@ -1166,7 +1166,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
                  if (Debug == true)
                     clog << "  Removing " << I.FullName(false) << " because I can't find " << Start.TargetPkg().FullName(false) << endl;
                  if (InOr == false)
-                    Cache.MarkDelete(I);
+                    Cache.MarkDelete(I, false, 0, false);
               }
 
               Change = true;
@@ -1193,7 +1193,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
                  {
                     if (Debug == true)
                        clog << "  Fixing " << I.FullName(false) << " via remove of " << J->Pkg.FullName(false) << endl;
-                    Cache.MarkDelete(J->Pkg);
+                    Cache.MarkDelete(J->Pkg, false, 0, false);
                  }
               }
               else
index b12e076d5d1e9ec7d7210df567142e8a2cb09b51..ddbc8de89e624e48cdbb72d0c9f0956d5ff9db87 100644 (file)
@@ -17,6 +17,9 @@ apt (0.9.7.7) UNRELEASED; urgency=low
   * cmdline/apt-get.cc:
     - do not call Mark{Install,Delete} from the autoremove code with
       the FromUser bit set to avoid modifying the auto-installed bit
+  * apt-pkg/algorithms.cc:
+    - ensure pkgProblemResolver calls MarkDelete without FromUser set
+      so that it can't overrule holds and the protection flag
 
  -- Jordi Mallach <jordi@debian.org>  Thu, 18 Oct 2012 23:30:46 +0200