summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-07-30 17:40:01 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-07-30 17:40:01 +0200
commit4cbf323fabcc44946001a215c224ce5b080519ca (patch)
tree4391ea660a915fb330278bf4856508ec26a477c0 /apt-pkg
parente3326595301fc7bd1ee025a9dbb09ca51a08f5fa (diff)
* apt-pkg/pkgcache.cc:
- re-evaluate the architectures cache when the cache is (re)opened
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/pkgcache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 9e1f8b633..ae11057ed 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -111,7 +111,10 @@ bool pkgCache::Header::CheckSizes(Header &Against) const
/* */
pkgCache::pkgCache(MMap *Map, bool DoMap) : Map(*Map)
{
- MultiArchEnabled = APT::Configuration::getArchitectures().size() > 1;
+ // call getArchitectures() with cached=false to ensure that the
+ // architectures cache is re-evaulated. this is needed in cases
+ // when the APT::Architecture field changes between two cache creations
+ MultiArchEnabled = APT::Configuration::getArchitectures(false).size() > 1;
if (DoMap == true)
ReMap();
}