+ // but first get implicit provides done
+ if (APT::Configuration::checkArchitecture(Pkg.Arch()) == true)
+ {
+ pkgCache::PkgIterator const M = Grp.FindPreferredPkg(false); // native or any foreign pkg will do
+ if (M.end() == false) {
+ pkgCache::PrvIterator Prv;
+ Dynamic<pkgCache::PrvIterator> DynPrv(Prv);
+ for (Prv = M.ProvidesList(); Prv.end() == false; ++Prv)
+ {
+ if ((Prv->Flags & pkgCache::Flag::ArchSpecific) != 0)
+ continue;
+ pkgCache::VerIterator Ver = Prv.OwnerVer();
+ Dynamic<pkgCache::VerIterator> DynVer(Ver);
+ if ((Ver->MultiArch & pkgCache::Version::Allowed) == pkgCache::Version::Allowed ||
+ ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign &&
+ (Prv->Flags & pkgCache::Flag::MultiArchImplicit) == 0))
+ if (NewProvides(Ver, Pkg, Prv->ProvideVersion, Prv->Flags) == false)
+ return false;
+ }
+ }
+
+
+ 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))
+ 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
+ {
+ pkgCache::PkgIterator const M = Grp.FindPreferredPkg(false);
+ if (M.end() == false) {
+ pkgCache::DepIterator Dep;
+ Dynamic<pkgCache::DepIterator> DynDep(Dep);
+ for (Dep = M.RevDependsList(); Dep.end() == false; ++Dep)
+ {
+ if ((Dep->CompareOp & (pkgCache::Dep::ArchSpecific | pkgCache::Dep::MultiArchImplicit)) != 0)
+ continue;
+ if (Dep->Type != pkgCache::Dep::DpkgBreaks && Dep->Type != pkgCache::Dep::Conflicts &&
+ Dep->Type != pkgCache::Dep::Replaces)
+ continue;
+ pkgCache::VerIterator Ver = Dep.ParentVer();
+ Dynamic<pkgCache::VerIterator> DynVer(Ver);
+ map_pointer_t * unused = NULL;
+ if (NewDepends(Pkg, Ver, Dep->Version, Dep->CompareOp, Dep->Type, unused) == false)
+ return false;
+ }
+ }
+ }
+