]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcachegen.cc
Arch() on a MultiArch:all version should return "all" to be compatible
[apt.git] / apt-pkg / pkgcachegen.cc
index 037c0cb63849b51708aca353068c227ef4e8e6bb..ebda325f73f36e685d3b57cb831bcd61187f3d1d 100644 (file)
@@ -668,13 +668,14 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator Ver,
 // ---------------------------------------------------------------------
 /* */
 bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver,
-                                               const string &PackageName,
+                                               const string &PkgName,
+                                               const string &PkgArch,
                                                const string &Version)
 {
    pkgCache &Cache = Owner->Cache;
 
    // We do not add self referencing provides
-   if (unlikely(Ver.ParentPkg().Name() == PackageName))
+   if (Ver.ParentPkg().Name() == PkgName && PkgArch == Ver.Arch())
       return true;
    
    // Get a structure
@@ -693,7 +694,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver,
    
    // Locate the target package
    pkgCache::PkgIterator Pkg;
-   if (unlikely(Owner->NewPackage(Pkg,PackageName,string(Ver.Arch())) == false))
+   if (unlikely(Owner->NewPackage(Pkg,PkgName, PkgArch) == false))
       return false;
    
    // Link it to the package