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;
- do {
+ const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 100);
+ unsigned int i=0;
+ do
+ {
Changed = false;
for (DepIterator D = instVer.DependsList(); D.end() == false; )
{
if (Bad == true && Changed == false && Debug == true)
std::clog << OutputInDepth(Depth) << "Could not satisfy " << Start << std::endl;
}
+ if (i++ > max_loops)
+ return _error->Error("Internal error: MaxLoopCount reached in SmartUnPack for %s, aborting", Pkg.FullName().c_str());
} while (Changed == true);
if (Bad) {
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;
- do {
+ const unsigned int max_loops = _config->FindI("APT::pkgPackageManager::MaxLoopCount", 100);
+ unsigned int i;
+ do
+ {
Changed = false;
for (DepIterator D = instVer.DependsList(); D.end() == false; )
{
}
}
}
+ if (i++ > max_loops)
+ return _error->Error("Internal error: MaxLoopCount reached in SmartConfigure for %s, aborting", Pkg.FullName().c_str());
} while (Changed == true);
// Check for reverse conflicts.
[ Michael Vogt ]
* apt-pkg/packagemanager.cc:
- fix inconsistent clog/cout usage in the debug output
+ - add APT::pkgPackageManager::MaxLoopCount to ensure that the
+ ordering code does not get into a endless loop when it flip-flops
+ between two states
[ David Kalnischkies ]
* apt-pkg/packagemanager.cc: