Преглед изворни кода

try harder to find the other pseudo versions for autoremove multiarch

David Kalnischkies пре 16 година
родитељ
комит
392a882ad8
2 измењених фајлова са 3 додато и 5 уклоњено
  1. 2 5
      apt-pkg/depcache.cc
  2. 1 0
      debian/changelog

+ 2 - 5
apt-pkg/depcache.cc

@@ -1719,10 +1719,6 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
 
    // If the version belongs to a Multi-Arch all package
    // we will mark all others in this Group with this version also
-   // Beware: We compare versions here the lazy way: string comparision
-   // this is bad if multiple repositories provide different versions
-   // of the package with an identical version number - but even in this
-   // case the dependencies are likely the same.
    if (ver->MultiArch == pkgCache::Version::All &&
 	strcmp(ver.Arch(true), "all") == 0)
    {
@@ -1734,7 +1730,8 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
 	 for (VerIterator V = P.VersionList();
 	      V.end() != true; ++V)
 	 {
-	    if (strcmp(VerStr, V.VerStr()) != 0)
+	    if (ver->Hash != V->Hash ||
+		strcmp(VerStr, V.VerStr()) != 0)
 	       continue;
 	    MarkPackage(P, V, follow_recommends, follow_suggests);
 	    break;

+ 1 - 0
debian/changelog

@@ -9,6 +9,7 @@ apt (0.7.26~exp6) UNRELEASED; urgency=low
   * apt-pkg/depcache.cc:
     - do the autoremove mark process also for required packages to handle
       these illegally depending on lower priority packages (Closes: #583517)
+    - try harder to find the other pseudo versions for autoremove multiarch
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 28 May 2010 19:03:30 +0200