Pārlūkot izejas kodu

if a Breaks can't be upgraded, remove it. If it or a Conflict
can't be removed the installation of the breaker fails.

David Kalnischkies 15 gadi atpakaļ
vecāks
revīzija
a16dec4dbe
2 mainītis faili ar 9 papildinājumiem un 6 dzēšanām
  1. 6 5
      apt-pkg/depcache.cc
  2. 3 1
      debian/changelog

+ 6 - 5
apt-pkg/depcache.cc

@@ -1172,16 +1172,17 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
 	       continue;
 	       continue;
 
 
 	    if (PkgState[Pkg->ID].CandidateVer != *I &&
 	    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;
 	 continue;
       }      
       }      
    }
    }
 
 
-   return true;
+   return Dep.end() == true;
 }
 }
 									/*}}}*/
 									/*}}}*/
 // DepCache::IsInstallOk - check if it is ok to install this package	/*{{{*/
 // DepCache::IsInstallOk - check if it is ok to install this package	/*{{{*/

+ 3 - 1
debian/changelog

@@ -14,12 +14,14 @@ apt (0.8.15) UNRELEASED; urgency=low
     - use a boolean instead of an int for Add/Remove in AddStates
     - use a boolean instead of an int for Add/Remove in AddStates
       similar to how it works with AddSizes
       similar to how it works with AddSizes
     - let the Mark methods return if their marking was successful
     - 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 ]
   [ Stefano Zacchiroli ]
   * doc/external-dependency-solver-protocol.txt:
   * doc/external-dependency-solver-protocol.txt:
     - describe EDSP and the configuration interface around it
     - 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
 apt (0.8.14.2) UNRELEASED; urgency=low