summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-06-11 14:56:11 +0200
committerMichael Vogt <egon@debian-devbox>2012-06-11 14:56:11 +0200
commitcb6a5776bfb5f74d94f32db55f2de148c27a5d10 (patch)
tree3c8f8bcaeefb9e51bff8476b262de18b4b39b11b /apt-pkg/pkgcache.cc
parent563fd891d80feedefd812aad83844e2189870e2c (diff)
parent249a02f55a2b311fc130efe3b3a99995b6a71360 (diff)
merged from donkult
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 997c70768..f694a237e 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -708,6 +708,21 @@ bool pkgCache::DepIterator::IsIgnorable(PrvIterator const &Prv) const
return false;
}
/*}}}*/
+// DepIterator::IsMultiArchImplicit - added by the cache generation /*{{{*/
+// ---------------------------------------------------------------------
+/* MultiArch can be translated to SingleArch for an resolver and we did so,
+ by adding dependencies to help the resolver understand the problem, but
+ sometimes it is needed to identify these to ignore them… */
+bool pkgCache::DepIterator::IsMultiArchImplicit() const
+{
+ if (ParentPkg()->Arch != TargetPkg()->Arch &&
+ (S->Type == pkgCache::Dep::Replaces ||
+ S->Type == pkgCache::Dep::DpkgBreaks ||
+ S->Type == pkgCache::Dep::Conflicts))
+ return true;
+ return false;
+}
+ /*}}}*/
// ostream operator to handle string representation of a dependecy /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -946,3 +961,17 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const
};
/*}}}*/
+// PrvIterator::IsMultiArchImplicit - added by the cache generation /*{{{*/
+// ---------------------------------------------------------------------
+/* MultiArch can be translated to SingleArch for an resolver and we did so,
+ by adding provides to help the resolver understand the problem, but
+ sometimes it is needed to identify these to ignore them… */
+bool pkgCache::PrvIterator::IsMultiArchImplicit() const
+{
+ pkgCache::PkgIterator const Owner = OwnerPkg();
+ pkgCache::PkgIterator const Parent = ParentPkg();
+ if (Owner->Arch != Parent->Arch || Owner->Name == Parent->Name)
+ return true;
+ return false;
+}
+ /*}}}*/