Pārlūkot izejas kodu

cherry pick from donkult

Michael Vogt 15 gadi atpakaļ
vecāks
revīzija
15657fcc72
2 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 6 0
      apt-pkg/orderlist.cc
  2. 3 0
      debian/changelog

+ 6 - 0
apt-pkg/orderlist.cc

@@ -1073,6 +1073,12 @@ bool pkgOrderList::CheckDep(DepIterator D)
          just needs one */
       if (D.IsNegative() == false)
       {
+	 // ignore provides by older versions of this package
+	 if (((D.Reverse() == false && Pkg == D.ParentPkg()) ||
+	      (D.Reverse() == true && Pkg == D.TargetPkg())) &&
+	     Cache[Pkg].InstallVer != *I)
+	    continue;
+
 	 /* Try to find something that does not have the after flag set
 	    if at all possible */
 	 if (IsFlag(Pkg,After) == true)

+ 3 - 0
debian/changelog

@@ -75,6 +75,9 @@ apt (0.8.15) UNRELEASED; urgency=low
   * apt-pkg/packagemanager.cc:
     - ensure for Multi-Arch:same packages that they are unpacked in
       lock step even in immediate configuration (Closes: #618288)
+  * apt-pkg/orderlist.cc:
+    - ensure that an old version of a package with a provides can
+      never satisfy a dependency of a newer version of this package
 
  -- Michael Vogt <mvo@debian.org>  Mon, 16 May 2011 14:57:52 +0200