summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-06-11 01:31:27 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-06-11 01:31:27 +0200
commitd5648746d4d4ea3f71aae5578a42050385e7b61d (patch)
treecbde04b55be4e87998d2f833b532c4dadb358c29 /apt-pkg/pkgcache.cc
parentd5dea0bed00ff1811fac1b56c2046d63c937a3f6 (diff)
* apt-pkg/cacheiterators.h:
- add an IsMultiArchImplicit() method for Dep- and PrvIterator
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 997c70768..e06e74579 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -708,6 +708,18 @@ 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)
+ return true;
+ return false;
+}
+ /*}}}*/
// ostream operator to handle string representation of a dependecy /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -946,3 +958,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;
+}
+ /*}}}*/