summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2009-06-30 21:44:24 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2009-06-30 21:44:24 +0200
commit6910a2accecd7c8e8493b74130d8dbf3972014a8 (patch)
tree87e53b67bd2d808be6414f7214eecc8e5464009a /apt-pkg/algorithms.cc
parent92fcbfc16396d9a2fbde0edb0902d4ebe7ff0090 (diff)
* add hook for MarkInstall and MarkDelete (closes: #470035)
* honor the dpkg hold state in new Marker hooks (closes: #64141) Combine the proposed AutoInstOk and IsAutoInstallOk to more general hooks for MarkInstall (and another one for MarkDelete) with the same parameters as the call these hooks should check.
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc25
1 files changed, 5 insertions, 20 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 68a4af8ed..a30a02edb 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -984,26 +984,11 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
// Consider other options
if (InOr == false)
{
- if (Cache.AutoInstOk(I, Cache[I].CandidateVerIter(Cache),Start) == true)
- {
- if (Debug == true)
- clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl;
- Cache.MarkDelete(I);
- if (Counter > 1)
- {
- if (Scores[Pkg->ID] > Scores[I->ID])
- Scores[I->ID] = Scores[Pkg->ID];
- }
- } else {
- /* The dependency of the TargetPkg would be satisfiable with I but it is
- forbidden to install I automatical, so anything we can do is hold
- back the TargetPkg.
- */
- if (Debug == true)
- clog << " Hold back " << Start.TargetPkg().Name() <<
- " rather than change denied AutoInstall " << I.Name() << endl;
- Cache.MarkKeep(Start.TargetPkg());
- }
+ if (Debug == true)
+ clog << " Removing " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl;
+ Cache.MarkDelete(I);
+ if (Counter > 1 && Scores[Pkg->ID] > Scores[I->ID])
+ Scores[I->ID] = Scores[Pkg->ID];
}
}
}