diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-07 11:45:06 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-07 11:45:06 +0100 |
commit | a1ac2ca85ae4d7c8b3ab3c4e2f3ba6c26202c363 (patch) | |
tree | 376c5d181400438db89931f3ce079d2f2e175b8e /apt-pkg | |
parent | 6a910c9db4d450241a57f61b2d3d3e302bb9c11c (diff) |
* apt-pkg/pkgcachegen.cc:
- in multiarch, let :all packages conflict with :any packages
with a different version to be sure
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index ed35174bb..5b943cca1 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -638,21 +638,19 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress) Dynamic<pkgCache::PkgIterator> DynP(P); for (; P.end() != true; P = G.NextPkg(P)) { - if (strcmp(P.Arch(),"all") == 0) - continue; pkgCache::PkgIterator allPkg; Dynamic<pkgCache::PkgIterator> DynallPkg(allPkg); pkgCache::VerIterator V = P.VersionList(); Dynamic<pkgCache::VerIterator> DynV(V); for (; V.end() != true; V++) { - string const Arch = V.Arch(true); + char const * const Arch = P.Arch(); map_ptrloc *OldDepLast = NULL; /* MultiArch handling introduces a lot of implicit Dependencies: - 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::All || + bool const coInstall = ((V->MultiArch == pkgCache::Version::All && strcmp(Arch, "all") != 0) || V->MultiArch == pkgCache::Version::Same); if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true) allPkg = G.FindPkg("all"); @@ -686,9 +684,15 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress) } } else { // Conflicts: ${self}:other - NewDepends(D, V, "", - pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, - OldDepLast); + if (strcmp(Arch, "all") == 0) { + NewDepends(D, V, V.VerStr(), + pkgCache::Dep::NotEquals, pkgCache::Dep::Conflicts, + OldDepLast); + } else { + NewDepends(D, V, "", + pkgCache::Dep::NoOp, pkgCache::Dep::Conflicts, + OldDepLast); + } } } } |