summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-04-05 11:58:09 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-04-05 11:58:09 +0200
commit70d761713bf1b1b4520079161708f66e8e3a4e31 (patch)
tree2467b28af8632554bc6f4ad186abe9ee0546ffa9 /apt-pkg/pkgcachegen.cc
parent8d39b60d85b8123758f310e4a279c71879e13a06 (diff)
parent00870bf52186b5adb9819c707b411ac2fffe482b (diff)
merged from debian-sid
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index d44dbf3a9..b0ee04554 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -178,12 +178,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
if (PackageName.empty() == true)
return false;
- /* Treat Arch all packages as the same as the native arch. */
- string Arch;
- if (List.ArchitectureAll() == true)
- Arch = _config->Find("APT::Architecture");
- else
- Arch = List.Architecture();
+ string const Arch = List.Architecture();
// Get a pointer to the package structure
pkgCache::PkgIterator Pkg;
@@ -484,7 +479,7 @@ 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.c_str());
+ map_ptrloc const idxArch = WriteUniqString((Arch == "all") ? _config->Find("APT::Architecture") : Arch.c_str());
if (unlikely(idxArch == 0))
return false;
Pkg->Arch = idxArch;
@@ -643,7 +638,7 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
- MultiArch: same → Co-Installable if they have the same version
- Architecture: all → Need to be Co-Installable for internal reasons
- All others conflict with all other group members */
- bool const coInstall = (V->MultiArch == pkgCache::Version::Same);
+ 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)
@@ -787,7 +782,8 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver,
pkgCache &Cache = Owner->Cache;
// We do not add self referencing provides
- if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch())
+ if (Ver.ParentPkg().Name() == PkgName && (PkgArch == Ver.ParentPkg().Arch() ||
+ (PkgArch == "all" && _config->Find("APT::Architecture") == Ver.ParentPkg().Arch())))
return true;
// Get a structure