diff options
author | Julian Andres Klode <jak@debian.org> | 2011-04-15 14:25:43 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2011-04-15 14:25:43 +0200 |
commit | 076b71228a1439b7c871246c8cc29066ac2aaa70 (patch) | |
tree | 7f7d8e00cda627867ebbbe5657b77c00e622d16e /apt-pkg/pkgcachegen.cc | |
parent | 9cfaed994f05e44edcd149d9a640eb499ee100ca (diff) | |
parent | 959470da73e7dc325321bb5024f1fd6d24bd9e9b (diff) |
Merge from DonKult
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index b0ee04554..9820fde81 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -479,7 +479,8 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name // Set the name, arch and the ID Pkg->Name = Grp->Name; Pkg->Group = Grp.Index(); - map_ptrloc const idxArch = WriteUniqString((Arch == "all") ? _config->Find("APT::Architecture") : Arch.c_str()); + // all is mapped to the native architecture + map_ptrloc const idxArch = (Arch == "all") ? Cache.HeaderP->Architecture : WriteUniqString(Arch.c_str()); if (unlikely(idxArch == 0)) return false; Pkg->Arch = idxArch; @@ -783,7 +784,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver, // We do not add self referencing provides if (Ver.ParentPkg().Name() == PkgName && (PkgArch == Ver.ParentPkg().Arch() || - (PkgArch == "all" && _config->Find("APT::Architecture") == Ver.ParentPkg().Arch()))) + (PkgArch == "all" && strcmp((Cache.StrP + Cache.HeaderP->Architecture), Ver.ParentPkg().Arch()) == 0))) return true; // Get a structure |