]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
promote filesize to a hashstring
[apt.git] / apt-pkg / depcache.cc
index 16282df2135e358c9917139737527cffdd4f30d4..1332f3ee20ad16f0f6dd43e981d29c76ba966392 100644 (file)
@@ -1961,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<InRootSetFunc> f(GetRootSetFunc());
+   if(f.get() != NULL)
+      return MarkAndSweep(*f.get());
+   else
+      return false;
+}
+                                                                       /*}}}*/