if a Breaks can't be upgraded, remove it. If it or a Conflict
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 17 May 2011 16:23:20 +0000 (18:23 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 17 May 2011 16:23:20 +0000 (18:23 +0200)
can't be removed the installation of the breaker fails.

apt-pkg/depcache.cc
debian/changelog

index f84ec25..1d905df 100644 (file)
@@ -1172,16 +1172,17 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
               continue;
 
            if (PkgState[Pkg->ID].CandidateVer != *I &&
-               Start->Type == Dep::DpkgBreaks)
-              MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps);
-           else
-              MarkDelete(Pkg,false,Depth + 1, false);
+               Start->Type == Dep::DpkgBreaks &&
+               MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps) == true)
+              continue;
+           else if (MarkDelete(Pkg,false,Depth + 1, false) == false)
+              break;
         }
         continue;
       }      
    }
 
-   return true;
+   return Dep.end() == true;
 }
                                                                        /*}}}*/
 // DepCache::IsInstallOk - check if it is ok to install this package   /*{{{*/
index 8375711..9fc6dc1 100644 (file)
@@ -14,12 +14,14 @@ apt (0.8.15) UNRELEASED; urgency=low
     - use a boolean instead of an int for Add/Remove in AddStates
       similar to how it works with AddSizes
     - let the Mark methods return if their marking was successful
+    - if a Breaks can't be upgraded, remove it. If it or a Conflict
+      can't be removed the installation of the breaker fails.
 
   [ Stefano Zacchiroli ]
   * doc/external-dependency-solver-protocol.txt:
     - describe EDSP and the configuration interface around it
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Tue, 17 May 2011 17:53:44 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Tue, 17 May 2011 17:59:24 +0200
 
 apt (0.8.14.2) UNRELEASED; urgency=low