From 6248b28e9c9013e074120ae74b6a9fccee75c318 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 11 May 2010 13:59:02 +0200 Subject: * apt-pkg/depcache.cc: - be doublesure that the killer query is empty before starting reinstall --- apt-pkg/depcache.cc | 21 +++++++++++---------- debian/changelog | 2 ++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 4d1a08eb6..411ae5f62 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -804,17 +804,18 @@ void pkgDepCache::Update(OpProgress *Prog) /* FIXME: recheck breaks proper progress reporting as we don't know how many packages we need to recheck. To lower the effect a bit we increase with a kill, but we should do something more clever… */ - for(std::set::const_iterator p = recheck.begin(); - p != recheck.end(); ++p) { - if (Prog != 0 && Done%20 == 0) - Prog->Progress(Done); - PkgIterator P = PkgIterator(*Cache, Cache->PkgP + *p); - if (RemovePseudoInstalledPkg(P, recheck) == true) { - ++killed; - ++Done; + while(recheck.empty() == false) + for (std::set::const_iterator p = recheck.begin(); + p != recheck.end(); ++p) { + if (Prog != 0 && Done%20 == 0) + Prog->Progress(Done); + PkgIterator P = PkgIterator(*Cache, Cache->PkgP + *p); + if (RemovePseudoInstalledPkg(P, recheck) == true) { + ++killed; + ++Done; + } + recheck.erase(p); } - recheck.erase(p); - } /* Okay, we have killed a great amount of pseudopackages - we have killed so many that we have now arch "all" packages diff --git a/debian/changelog b/debian/changelog index 43f76a18e..845a37581 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ apt (0.7.26~exp5) UNRELEASED; urgency=low "old" file - thanks to Philipp Weis for noticing! (Closes: #571541) * debian/rules: - remove targets refering to CVS or arch as they are useless + * apt-pkg/depcache.cc: + - be doublesure that the killer query is empty before starting reinstall [ Jari Aalto ] * debian/rules: -- cgit v1.2.3