X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/42d51f333e8ef522fed02cdfc48663488d56c3a3..49e1672884bf8d50713812bdd4eca26ab2076711:/apt-pkg/packagemanager.cc diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index b8932753d..8c0d2e855 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -338,7 +338,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) however if there is a loop (A depends on B, B depends on A) this will not be the case, so check for dependencies before configuring. */ bool Bad = false, Changed = false; - const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 500); + const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 5000); unsigned int i=0; std::list needConfigure; do @@ -420,11 +420,14 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) do { Changed = false; - for (std::list::iterator D = needConfigure.begin(); D != needConfigure.end(); ++D) + for (std::list::const_iterator D = needConfigure.begin(); D != needConfigure.end(); ++D) { - // Compute a single dependency element (glob or) + // Compute a single dependency element (glob or) without modifying D pkgCache::DepIterator Start, End; - D->GlobOr(Start,End); + { + pkgCache::DepIterator Discard = *D; + Discard.GlobOr(Start,End); + } if (End->Type != pkgCache::Dep::Depends) continue; @@ -483,9 +486,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) } - if (Bad == true && Changed == false && Debug == true) - std::clog << OutputInDepth(Depth) << "Could not satisfy " << Start << std::endl; + std::clog << OutputInDepth(Depth) << "Could not satisfy " << *D << std::endl; } if (i++ > max_loops) return _error->Error("Internal error: MaxLoopCount reached in SmartUnPack (2) for %s, aborting", Pkg.FullName().c_str()); @@ -626,7 +628,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c This will be either dealt with if the package is configured as a dependency of Pkg (if and when Pkg is configured), or by the ConfigureAll call at the end of the for loop in OrderInstall. */ bool Changed = false; - const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 500); + const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 5000); unsigned int i = 0; do {