|
@@ -178,12 +178,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
|
|
|
if (PackageName.empty() == true)
|
|
if (PackageName.empty() == true)
|
|
|
return false;
|
|
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
|
|
// Get a pointer to the package structure
|
|
|
pkgCache::PkgIterator Pkg;
|
|
pkgCache::PkgIterator Pkg;
|
|
@@ -484,7 +479,7 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name
|
|
|
// Set the name, arch and the ID
|
|
// Set the name, arch and the ID
|
|
|
Pkg->Name = Grp->Name;
|
|
Pkg->Name = Grp->Name;
|
|
|
Pkg->Group = Grp.Index();
|
|
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))
|
|
if (unlikely(idxArch == 0))
|
|
|
return false;
|
|
return false;
|
|
|
Pkg->Arch = idxArch;
|
|
Pkg->Arch = idxArch;
|
|
@@ -787,7 +782,8 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver,
|
|
|
pkgCache &Cache = Owner->Cache;
|
|
pkgCache &Cache = Owner->Cache;
|
|
|
|
|
|
|
|
// We do not add self referencing provides
|
|
// 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;
|
|
return true;
|
|
|
|
|
|
|
|
// Get a structure
|
|
// Get a structure
|