]> git.saurik.com Git - apt.git/blobdiff - ftparchive/cachedb.cc
merged -r1875..1886 from lp:~donkult/apt/sid
[apt.git] / ftparchive / cachedb.cc
index 8a4ca023669361e32d23b25a8638be551a77c03d..dfda827b6b0b362af8218f2b9d359d1b88876587 100644 (file)
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "cachedb.h"
-#endif
-
 #include "cachedb.h"
 
 #include <apti18n.h>
@@ -186,11 +182,11 @@ bool CacheDB::GetFileInfo(string FileName, bool DoControl, bool DoContents,
        Stats.Bytes += CurStat.FileSize;
        Stats.Packages++;
 
-       if (DoControl && LoadControl() == false
-               || DoContents && LoadContents(GenContentsOnly) == false
-               || DoMD5 && GetMD5(false) == false
-               || DoSHA1 && GetSHA1(false) == false
-               || DoSHA256 && GetSHA256(false) == false)
+       if ((DoControl && LoadControl() == false)
+               || (DoContents && LoadContents(GenContentsOnly) == false)
+               || (DoMD5 && GetMD5(false) == false)
+               || (DoSHA1 && GetSHA1(false) == false)
+               || (DoSHA256 && GetSHA256(false) == false))
        {
                delete Fd;
                Fd = NULL;
@@ -467,6 +463,7 @@ bool CacheDB::Clean()
       
       Cursor->c_del(Cursor,0);
    }
+   Dbp->compact(Dbp, NULL, NULL, NULL, NULL, DB_FREE_SPACE, NULL);
 
    return true;
 }