cherry pick from donkult
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Jun 2011 14:45:59 +0000 (15:45 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Jun 2011 14:45:59 +0000 (15:45 +0100)
apt-pkg/orderlist.cc
debian/changelog

index ba43bc7..19661fc 100644 (file)
@@ -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)
index b6ce716..bbfe902 100644 (file)
@@ -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