]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
merged lp:~donkult/apt/sid
[apt.git] / apt-pkg / depcache.cc
index 659c4227e3f9245e8df6abafa573c285caed7ebf..411ae5f6253aa02e766cadb5c583ae5c01b87bd9 100644 (file)
@@ -192,7 +192,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog)                   /*{{{*/
         {
            PkgState[pkg->ID].Flags |= Flag::Auto;
            if (unlikely(debug_autoremove))
-              std::cout << "Auto-Installed : " << pkg.FullName() << std::endl;
+              std::clog << "Auto-Installed : " << pkg.FullName() << std::endl;
            if (pkgarch == "any")
            {
               pkgCache::GrpIterator G = pkg.Group();
@@ -804,17 +804,18 @@ void pkgDepCache::Update(OpProgress *Prog)
       /* FIXME: recheck breaks proper progress reporting as we don't know
                how many packages we need to recheck. To lower the effect
                a bit we increase with a kill, but we should do something more clever… */
-      for(std::set<unsigned long>::const_iterator p = recheck.begin();
-         p != recheck.end(); ++p) {
-        if (Prog != 0 && Done%20 == 0)
-           Prog->Progress(Done);
-        PkgIterator P = PkgIterator(*Cache, Cache->PkgP + *p);
-        if (RemovePseudoInstalledPkg(P, recheck) == true) {
-           ++killed;
-           ++Done;
+      while(recheck.empty() == false)
+        for (std::set<unsigned long>::const_iterator p = recheck.begin();
+            p != recheck.end(); ++p) {
+           if (Prog != 0 && Done%20 == 0)
+              Prog->Progress(Done);
+           PkgIterator P = PkgIterator(*Cache, Cache->PkgP + *p);
+           if (RemovePseudoInstalledPkg(P, recheck) == true) {
+              ++killed;
+              ++Done;
+           }
+           recheck.erase(p);
         }
-        recheck.erase(p);
-      }
 
       /* Okay, we have killed a great amount of pseudopackages -
         we have killed so many that we have now arch "all" packages
@@ -1819,7 +1820,7 @@ bool pkgDepCache::Sweep()                                         /*{{{*/
      {
        state.Garbage=true;
        if(debug_autoremove)
-          std::cout << "Garbage: " << p.FullName() << std::endl;
+          std::clog << "Garbage: " << p.FullName() << std::endl;
      }
   }