Try a little harder to upgrade obsoleted packages.
authorPanu Matilainen <pmatilai@laiskiainen.org>
Fri, 16 Nov 2007 10:05:28 +0000 (12:05 +0200)
committerPanu Matilainen <pmatilai@laiskiainen.org>
Fri, 16 Nov 2007 10:05:28 +0000 (12:05 +0200)
This *seems* to fix the case for rhbz#353271 but ... uh.

apt-pkg/algorithms.cc

index a3fb896..cd226ee 100644 (file)
@@ -962,8 +962,9 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
                    End->Type != pkgCache::Dep::Conflicts &&
                    End->Type != pkgCache::Dep::Obsoletes))
               {
-                 // Try a little harder to fix protected packages..
-                 if ((Flags[I->ID] & Protected) == Protected)
+                 // Try a little harder for protected packages and obsoletes..
+                 if ((Flags[I->ID] & Protected) == Protected ||
+                     End->Type == pkgCache::Dep::Obsoletes)
                  {
                     if (DoUpgrade(Pkg) == true)
                     {