Make Proxy-Auto-Detect check for each host
[ntk/apt.git] / apt-pkg / depcache.cc
index aa96ac5..42e3139 100644 (file)
@@ -663,10 +663,11 @@ void pkgDepCache::Update(OpProgress *Prog)
 {   
    iUsrSize = 0;
    iDownloadSize = 0;
-   iDelCount = 0;
    iInstCount = 0;
+   iDelCount = 0;
    iKeepCount = 0;
    iBrokenCount = 0;
+   iPolicyBrokenCount = 0;
    iBadCount = 0;
 
    // Perform the depends pass
@@ -1374,7 +1375,7 @@ bool pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(PkgIterator con
 
         // the dependency is critical, but can't be installed, so discard the candidate
         // as the problemresolver will trip over it otherwise trying to install it (#735967)
-        if (Pkg->CurrentVer != 0)
+        if (Pkg->CurrentVer != 0 && (PkgState[Pkg->ID].iFlags & Protected) != Protected)
            SetCandidateVersion(Pkg.CurrentVer());
         return false;
       }