]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
test/test-indexes.sh: Stop hardcoding archive gpg key ID, get it from first failed...
[apt.git] / apt-pkg / depcache.cc
index 13abbe5ed2ae5c7bedf29e1614a2708ccdc5f21f..0f30f13c244f824fb7aed35e6b836f7b1ca859d9 100644 (file)
@@ -186,16 +186,16 @@ bool pkgDepCache::readStateFile(OpProgress *Prog)                 /*{{{*/
            if(reason > 0)
               PkgState[pkg->ID].Flags  |= Flag::Auto;
            if(debug_autoremove)
-              std::cout << "Auto-Installed : " << pkgname << std::endl;
+              std::clog << "Auto-Installed : " << pkgname << std::endl;
            amt+=section.size();
            if(Prog != NULL)
               Prog->OverallProgress(amt, file_size, 1, 
                                     _("Reading state information"));
         }
-        if(Prog != NULL)
-           Prog->OverallProgress(file_size, file_size, 1, 
-                                 _("Reading state information"));
       }
+      if(Prog != NULL)
+        Prog->OverallProgress(file_size, file_size, 1,
+                              _("Reading state information"));
    }
 
    return true;
@@ -243,7 +243,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)      /*{{{*/
            continue;
         bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto);
         if(_config->FindB("Debug::pkgAutoRemove",false))
-           std::clog << "Update exisiting AutoInstall info: " 
+           std::clog << "Update existing AutoInstall info: " 
                      << pkg.Name() << std::endl;
         TFRewriteData rewrite[2];
         rewrite[0].Tag = "Auto-Installed";
@@ -823,7 +823,7 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
 bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
                              unsigned long Depth, bool FromUser)
 {
-   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
+   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
    {
       if (DebugMarker == true)
         std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
@@ -1085,7 +1085,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
 bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
                              unsigned long Depth, bool FromUser)
 {
-   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
+   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
    {
       if (DebugMarker == true)
         std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl;
@@ -1511,7 +1511,7 @@ bool pkgDepCache::Sweep()                                         /*{{{*/
      {
        state.Garbage=true;
        if(debug_autoremove)
-          std::cout << "Garbage: " << p.Name() << std::endl;
+          std::clog << "Garbage: " << p.Name() << std::endl;
      }
   }