]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cachefile.cc
Move sysconf(_SC_OPEN_MAX); out of the for() loop to avoid unneeded syscalls
[apt.git] / apt-pkg / cachefile.cc
index 2401b015e1f0d80bace0a6c69dbfe93fa4fa73b6..ea3d454806223943e2902ebef8e1eb2071ec44b7 100644 (file)
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/policy.h>
 #include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/acquire-item.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/progress.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <string.h>
+#include <unistd.h>
+#include <string>
+#include <vector>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -136,6 +143,9 @@ bool pkgCacheFile::BuildDepCache(OpProgress *Progress)
    if (DCache != NULL)
       return true;
 
+   if (BuildPolicy(Progress) == false)
+      return false;
+
    DCache = new pkgDepCache(Cache,Policy);
    if (_error->PendingError() == true)
       return false;