From: David Kalnischkies Date: Tue, 17 May 2011 16:23:20 +0000 (+0200) Subject: if a Breaks can't be upgraded, remove it. If it or a Conflict X-Git-Tag: 0.9.0~91^2~4 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/a16dec4dbe7847597025f44f84027bb3f25f4f42 if a Breaks can't be upgraded, remove it. If it or a Conflict can't be removed the installation of the breaker fails. --- diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index f84ec25ca..1d905df2e 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -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 /*{{{*/ diff --git a/debian/changelog b/debian/changelog index 837571173..9fc6dc193 100644 --- a/debian/changelog +++ b/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 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 Tue, 17 May 2011 17:53:44 +0200 + -- David Kalnischkies Tue, 17 May 2011 17:59:24 +0200 apt (0.8.14.2) UNRELEASED; urgency=low