summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2008-02-21 16:49:03 +0100
committerMichael Vogt <egon@bottom>2008-02-21 16:49:03 +0100
commit0252c6beaab880081c1dc491bfe0904614a1baa7 (patch)
tree3a31cbb1530a99a5f936dad9d5c3345a5cb90890 /apt-pkg/algorithms.cc
parente3a1f08d41bf6ef6a42bbc6e5f8e20f7b4aa37a0 (diff)
parent7810fc042d4d3dda6b2c721d09d3eb7eadc12e2d (diff)
* cmdline/apt-key:
- add support for a master-keyring that contains signing keys that can be used to sign the archive signing keys. This should make key-rollover easier. * apt-pkg/deb/dpkgpm.cc: - merged patch from Kees Cook to fix anoying upper-case display on amd64 in sbuild * apt-pkg/algorithms.cc: - add APT::Update::Post-Invoke-Success script slot - Make the breaks handling use the kill list. This means, that a Breaks: Pkg (<< version) may put Pkg onto the remove list. * apt-pkg/deb/debmetaindex.cc: - add missing "Release" file uri when apt-get update --print-uris is run * methods/connect.cc: - remember hosts with Resolve failures or connect Timeouts
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 57b85e24f..eaab4c0ea 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() <<endl;
- Cache.MarkKeep(I, false, false);
- continue;
}
// Skip adding to the kill list if it is protected
@@ -1066,6 +1066,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
if ((Cache[J->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)
@@ -1371,7 +1372,11 @@ bool ListUpdate(pkgAcquireStatus &Stat,
return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead."));
- // Run the scripts if all was fine
+ // Run the success scripts if all was fine
+ if(!TransientNetworkFailure && !Failed)
+ RunScripts("APT::Update::Post-Invoke-Success");
+
+ // Run the other scripts
RunScripts("APT::Update::Post-Invoke");
return true;
}