]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
* Translations:
[apt.git] / apt-pkg / depcache.cc
index d1bea4cf6786d186f7008bfb784ac8c5c2c28cb6..8584419e110d3f1e713507f72a3c581b994bf551 100644 (file)
@@ -269,7 +269,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
         ostr.str(string(""));
         ostr << "Package: " << pkg.Name() 
              << "\nAuto-Installed: 1\n\n";
-        fprintf(OutFile,ostr.str().c_str());
+        fprintf(OutFile,"%s",ostr.str().c_str());
         fprintf(OutFile,"\n");
       }
    }
@@ -914,8 +914,9 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
             {
               //FIXME: deal better with or-groups(?)
               DepIterator LocalStart = D;
-              
-              if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg())
+
+              if(IsImportantDep(D) && !D.IsCritical() &&
+                 Start.TargetPkg() == D.TargetPkg())
                 {
                   if(!isPreviouslySatisfiedImportantDep)
                     {
@@ -1000,7 +1001,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
            if(Pkg.Section() && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section()))
            {
               if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true)
-                 std::clog << "Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Section)" << std::endl;
+                 std::clog << "Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Sections)" << std::endl;
               MarkInstall(InstPkg,true,Depth + 1, true);
            }
            else 
@@ -1460,3 +1461,4 @@ bool pkgDepCache::Sweep()
 
    return true;
 }
+