merge from lp:~donkult/apt/sid
[ntk/apt.git] / apt-pkg / pkgcachegen.cc
index 4eaf40b..739b538 100644 (file)
@@ -69,7 +69,9 @@ pkgCacheGenerator::pkgCacheGenerator(DynamicMMap *pMap,OpProgress *Prog) :
       *Cache.HeaderP = pkgCache::Header();
       map_ptrloc const idxVerSysName = WriteStringInMap(_system->VS->Label);
       Cache.HeaderP->VerSysName = idxVerSysName;
-      map_ptrloc const idxArchitecture = WriteStringInMap(_config->Find("APT::Architecture"));
+      // this pointer is set in ReMap, but we need it now for WriteUniqString
+      Cache.StringItemP = (pkgCache::StringItem *)Map.Data();
+      map_ptrloc const idxArchitecture = WriteUniqString(_config->Find("APT::Architecture"));
       Cache.HeaderP->Architecture = idxArchitecture;
       if (unlikely(idxVerSysName == 0 || idxArchitecture == 0))
         return;