projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* debian/apt.conf.autoremove:
[apt.git]
/
apt-pkg
/
algorithms.cc
diff --git
a/apt-pkg/algorithms.cc
b/apt-pkg/algorithms.cc
index 6e2b9755730c11b824dde72ce199b791a5d4972b..158564baf830bceebace64adc1fccf08dbf62a25 100644
(file)
--- 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)
{
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 << " 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
}
// 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 ||
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)
J->Dep->Type == pkgCache::Dep::Obsoletes)
{
if (Debug == true)
@@
-1107,8
+1108,7
@@
bool pkgProblemResolver::Resolve(bool BrokenFix)
return _error->Error(_("Unable to correct problems, you have held broken packages."));
}
return _error->Error(_("Unable to correct problems, you have held broken packages."));
}
- // set the auto-flags (mvo: I'm not sure if we _really_ need this, but
- // I didn't managed
+ // set the auto-flags (mvo: I'm not sure if we _really_ need this)
pkgCache::PkgIterator I = Cache.PkgBegin();
for (;I.end() != true; I++) {
if (Cache[I].NewInstall() && !(Flags[I->ID] & PreInstalled)) {
pkgCache::PkgIterator I = Cache.PkgBegin();
for (;I.end() != true; I++) {
if (Cache[I].NewInstall() && !(Flags[I->ID] & PreInstalled)) {
@@
-1356,7
+1356,7
@@
bool ListUpdate(pkgAcquireStatus &Stat,
// Keep "APT::Get::List-Cleanup" name for compatibility, but
// this is really a global option for the APT library now
if (!TransientNetworkFailure && !Failed &&
// Keep "APT::Get::List-Cleanup" name for compatibility, but
// this is really a global option for the APT library now
if (!TransientNetworkFailure && !Failed &&
- (_config->FindB("APT::Get::List-Cleanup",true) == true
||
+ (_config->FindB("APT::Get::List-Cleanup",true) == true
&&
_config->FindB("APT::List-Cleanup",true) == true))
{
if (Fetcher.Clean(_config->FindDir("Dir::State::lists")) == false ||
_config->FindB("APT::List-Cleanup",true) == true))
{
if (Fetcher.Clean(_config->FindDir("Dir::State::lists")) == false ||
@@
-1371,7
+1371,11
@@
bool ListUpdate(pkgAcquireStatus &Stat,
return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead."));
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;
}
RunScripts("APT::Update::Post-Invoke");
return true;
}