X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/453a5e964ef7404909132a4c5e9e734026fc93a3..fd9a8ca2ed30994a7946acbf54f25d27fe2b10cb:/apt-pkg/algorithms.cc diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 50cb6b659..625b49c3d 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -985,17 +985,17 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) if (Start->Type == pkgCache::Dep::DpkgBreaks) { - /* Would it help if we upgraded? */ - if (Cache[End] & pkgDepCache::DepGCVer) { + // first, try upgradring the package, if that + // does not help, the breaks goes onto the + // kill list + // FIXME: use DoUpgrade(Pkg) instead? + if (Cache[End] & pkgDepCache::DepGCVer) + { if (Debug) clog << " Upgrading " << Pkg.Name() << " due to Breaks field in " << I.Name() << endl; Cache.MarkInstall(Pkg, false, 0, false); continue; } - if (Debug) - clog << " Will not break " << Pkg.Name() << " as stated in Breaks field in " << I.Name() <Dep] & pkgDepCache::DepGNow) == 0) { if (J->Dep->Type == pkgCache::Dep::Conflicts || + J->Dep->Type == pkgCache::Dep::DpkgBreaks || J->Dep->Type == pkgCache::Dep::Obsoletes) { if (Debug == true) @@ -1370,11 +1371,7 @@ bool ListUpdate(pkgAcquireStatus &Stat, return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead.")); - // Run the success scripts if all was fine - if(!TransientNetworkFailure && !Failed) - RunScripts("APT::Update::Post-Invoke-Success"); - - // Run the other scripts + // Run the scripts if all was fine RunScripts("APT::Update::Post-Invoke"); return true; }