]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
Merge remote-tracking branch 'upstream/debian/experimental' into feature/no-more...
[apt.git] / apt-pkg / depcache.cc
index 42e31396bc64a58b4ff1afbc697384b356402e7a..1332f3ee20ad16f0f6dd43e981d29c76ba966392 100644 (file)
@@ -1226,7 +1226,7 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
               continue;
            }
            // now check if we should consider it a automatic dependency or not
-           if(InstPkg->CurrentVer == 0 && Pkg->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section()))
+           if(InstPkg->CurrentVer == 0 && InstVer->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", InstVer.Section()))
            {
               if(DebugAutoInstall == true)
                  std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct "
@@ -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;
+}
+                                                                       /*}}}*/