]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcachegen.cc
fix crash when P.Arch() was used but the cache got remapped
[apt.git] / apt-pkg / pkgcachegen.cc
index 2bfb776095f4a1deda5190d2a073bf450eb209dd..0e6ae698d39cf3e4b61bbffb8d3adc2ab0c0361e 100644 (file)
@@ -98,6 +98,7 @@ pkgCacheGenerator::~pkgCacheGenerator()
       return;
    
    Cache.HeaderP->Dirty = false;
+   Cache.HeaderP->CacheFileSize = Map.Size();
    Map.Sync(0,sizeof(pkgCache::Header));
 }
                                                                        /*}}}*/
@@ -647,7 +648,7 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
               bool const coInstall = ((V->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same);
               for (vector<string>::const_iterator A = archs.begin(); A != archs.end(); ++A)
               {
-                 if (*A == Arch)
+                 if (Arch == 0 || *A == Arch)
                     continue;
                  /* We allow only one installed arch at the time
                     per group, therefore each group member conflicts