X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7a66977486804d46d5860f568cbd80f54f0c42d0..07cb47e71f4de7e3c57f9dcfbfb82e4e5566aed6:/apt-pkg/depcache.cc?ds=sidebyside diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 492d16029..1332f3ee2 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -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 @@ -1960,3 +1961,17 @@ bool pkgDepCache::Sweep() /*{{{*/ return true; } /*}}}*/ +// DepCache::MarkAndSweep /*{{{*/ +bool pkgDepCache::MarkAndSweep(InRootSetFunc &rootFunc) +{ + return MarkRequired(rootFunc) && Sweep(); +} +bool pkgDepCache::MarkAndSweep() +{ + std::auto_ptr f(GetRootSetFunc()); + if(f.get() != NULL) + return MarkAndSweep(*f.get()); + else + return false; +} + /*}}}*/