diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-01-14 20:13:16 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-01-14 23:08:02 +0100 |
commit | 62428dbc17ffa7b5b8188e88609a9438428d6024 (patch) | |
tree | 5b4fb96209bd4f2bd8af80e09389d7ccc3222289 /apt-pkg/pkgcachegen.cc | |
parent | fa47f406cf434e175885c5920175c0cedcd62746 (diff) |
fix M-A:foreign provides creation for unknown archs
Architectures for packages which do not belong to the native nor a
foreign architecture (dubbed barbarian for now) which are marked
M-A:foreign still provide in their own architecture even if not for
others. Also, other M-A:foreign (and allowed) packages provide in these
barbarian architectures.
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index a26237296..43347cf65 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -572,8 +572,7 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg, StringView Name, } else // Group the Packages together { - // but first get implicit provides done - if (APT::Configuration::checkArchitecture(Pkg.Arch()) == true) + // if sibling is provided by another package, this one is too { pkgCache::PkgIterator const M = Grp.FindPreferredPkg(false); // native or any foreign pkg will do if (M.end() == false) { @@ -588,22 +587,31 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg, StringView Name, if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed || ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign && (Prv->Flags & pkgCache::Flag::MultiArchImplicit) == 0)) + { + if (APT::Configuration::checkArchitecture(Ver.ParentPkg().Arch()) == false) + continue; if (NewProvides(Ver, Pkg, Prv->ProvideVersion, Prv->Flags) == false) return false; + } } } - - + } + // let M-A:foreign package siblings provide this package + { pkgCache::PkgIterator P; pkgCache::VerIterator Ver; Dynamic<pkgCache::PkgIterator> DynP(P); Dynamic<pkgCache::VerIterator> DynVer(Ver); for (P = Grp.PackageList(); P.end() == false; P = Grp.NextPkg(P)) + { + if (APT::Configuration::checkArchitecture(P.Arch()) == false) + continue; for (Ver = P.VersionList(); Ver.end() == false; ++Ver) if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) if (NewProvides(Ver, Pkg, Ver->VerStr, pkgCache::Flag::MultiArchImplicit) == false) return false; + } } // and negative dependencies, don't forget negative dependencies { |