Просмотр исходного кода

* apt-pkg/pkgcachegen.cc:
- in multiarch, let :all packages conflict with :any packages
with a different version to be sure

David Kalnischkies лет назад: 15
Родитель
Сommit
a1ac2ca85a
2 измененных файлов с 15 добавлено и 8 удалено
  1. 11 7
      apt-pkg/pkgcachegen.cc
  2. 4 1
      debian/changelog

+ 11 - 7
apt-pkg/pkgcachegen.cc

@@ -638,21 +638,19 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
 	 Dynamic<pkgCache::PkgIterator> DynP(P);
 	 Dynamic<pkgCache::PkgIterator> DynP(P);
 	 for (; P.end() != true; P = G.NextPkg(P))
 	 for (; P.end() != true; P = G.NextPkg(P))
 	 {
 	 {
-	    if (strcmp(P.Arch(),"all") == 0)
-	       continue;
 	    pkgCache::PkgIterator allPkg;
 	    pkgCache::PkgIterator allPkg;
 	    Dynamic<pkgCache::PkgIterator> DynallPkg(allPkg);
 	    Dynamic<pkgCache::PkgIterator> DynallPkg(allPkg);
 	    pkgCache::VerIterator V = P.VersionList();
 	    pkgCache::VerIterator V = P.VersionList();
 	    Dynamic<pkgCache::VerIterator> DynV(V);
 	    Dynamic<pkgCache::VerIterator> DynV(V);
 	    for (; V.end() != true; V++)
 	    for (; V.end() != true; V++)
 	    {
 	    {
-	       string const Arch = V.Arch(true);
+	       char const * const Arch = P.Arch();
 	       map_ptrloc *OldDepLast = NULL;
 	       map_ptrloc *OldDepLast = NULL;
 	       /* MultiArch handling introduces a lot of implicit Dependencies:
 	       /* MultiArch handling introduces a lot of implicit Dependencies:
 		- MultiArch: same → Co-Installable if they have the same version
 		- MultiArch: same → Co-Installable if they have the same version
 		- Architecture: all → Need to be Co-Installable for internal reasons
 		- Architecture: all → Need to be Co-Installable for internal reasons
 		- All others conflict with all other group members */
 		- 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);
 					V->MultiArch == pkgCache::Version::Same);
 	       if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true)
 	       if (V->MultiArch == pkgCache::Version::All && allPkg.end() == true)
 		  allPkg = G.FindPkg("all");
 		  allPkg = G.FindPkg("all");
@@ -686,9 +684,15 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
 		     }
 		     }
 		  } else {
 		  } else {
 			// Conflicts: ${self}:other
 			// 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);
+			}
 		  }
 		  }
 	       }
 	       }
 	    }
 	    }

+ 4 - 1
debian/changelog

@@ -79,6 +79,9 @@ apt (0.8.11) UNRELEASED; urgency=low
   * apt-pkg/algorithms.cc:
   * apt-pkg/algorithms.cc:
     - mark pseudo packages of installed all packages as configured
     - mark pseudo packages of installed all packages as configured
       in the simulation as we don't call configure for these packages
       in the simulation as we don't call configure for these packages
+  * apt-pkg/pkgcachegen.cc:
+    - in multiarch, let :all packages conflict with :any packages
+      with a different version to be sure
 
 
   [ Michael Vogt ]
   [ Michael Vogt ]
   * methods/http.cc:
   * methods/http.cc:
@@ -96,7 +99,7 @@ apt (0.8.11) UNRELEASED; urgency=low
       will actually test uncompressed indexes regardless of the internal
       will actually test uncompressed indexes regardless of the internal
       default value of Acquire::GzipIndexes.
       default value of Acquire::GzipIndexes.
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 07 Feb 2011 11:26:03 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 07 Feb 2011 11:42:41 +0100
 
 
 apt (0.8.10.3) unstable; urgency=low
 apt (0.8.10.3) unstable; urgency=low