summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-10-13 11:16:30 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-10-13 11:16:30 +0200
commit7ccb5efb4f5b4471e6b424377f42feff070bb2d3 (patch)
tree0042c444d470b583622eb41ffbbc0120a04e0aae /apt-pkg/pkgcachegen.cc
parentdfe45e1f1133ffabe55297ae76c77a0767e3ae55 (diff)
write the native architecture as unique string into the cache header
as it is used for arch:all packages as a map to arch:native. Otherwise arch comparisons later will see differences (Closes: #689323)
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 4eaf40b51..739b538c6 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -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;