]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcachegen.cc
fix foldmarker in algorithms.h
[apt.git] / apt-pkg / pkgcachegen.cc
index 8a7c1e979f6428aa9a550bdf907b08e9f2f09fa4..f7e01f60b12c873fa0f3721633edf394199ac046 100644 (file)
@@ -10,7 +10,7 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#define APT_COMPATIBILITY 986
+#include <config.h>
 
 #include <apt-pkg/pkgcachegen.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/macros.h>
-
 #include <apt-pkg/tagfile.h>
-
-#include <apti18n.h>
+#include <apt-pkg/metaindex.h>
+#include <apt-pkg/fileutl.h>
 
 #include <vector>
-
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
 #include <stdio.h>
+
+#include <apti18n.h>
                                                                        /*}}}*/
 typedef vector<pkgIndexFile *>::iterator FileIterator;
 template <typename Iter> std::vector<Iter*> pkgCacheGenerator::Dynamic<Iter>::toReMap;
@@ -98,6 +98,7 @@ pkgCacheGenerator::~pkgCacheGenerator()
       return;
    
    Cache.HeaderP->Dirty = false;
+   Cache.HeaderP->CacheFileSize = Map.Size();
    Map.Sync(0,sizeof(pkgCache::Header));
 }
                                                                        /*}}}*/
@@ -935,7 +936,7 @@ static bool CheckValidity(const string &CacheFile,
       return false;
    }
 
-   if (List.GetLastModifiedTime() < GetModificationTime(CacheFile))
+   if (List.GetLastModifiedTime() > GetModificationTime(CacheFile))
    {
       if (Debug == true)
         std::clog << "sources.list is newer than the cache" << std::endl;