* apt-pkg/cacheiterators.h:
[ntk/apt.git] / apt-pkg / pkgcache.cc
index 997c707..e06e745 100644 (file)
@@ -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;
+}
+                                                                       /*}}}*/