summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-05-09 18:00:28 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-05-09 18:00:28 +0200
commitb57c0e355d7f27a74c860ed73700cf9241cb4e61 (patch)
tree43c0b71e4df4d9df7ae6bf64657d3ffb74753a04 /apt-pkg/algorithms.cc
parentebfeeaedf5bc357170cae971c0f6a1458ff65f65 (diff)
implement proper progress report with OpProgress
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc24
1 files changed, 16 insertions, 8 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 5d9fefaa6..31c3e9c28 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -333,8 +333,10 @@ bool pkgFixBroken(pkgDepCache &Cache)
bool pkgDistUpgrade(pkgDepCache &Cache)
{
std::string const solver = _config->Find("APT::Solver::Name", "internal");
- if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache, false, true, false);
+ if (solver != "internal") {
+ OpTextProgress Prog(*_config);
+ return EDSP::ResolveExternal(solver.c_str(), Cache, false, true, false, &Prog);
+ }
pkgDepCache::ActionGroup group(Cache);
@@ -389,8 +391,10 @@ bool pkgDistUpgrade(pkgDepCache &Cache)
bool pkgAllUpgrade(pkgDepCache &Cache)
{
std::string const solver = _config->Find("APT::Solver::Name", "internal");
- if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false);
+ if (solver != "internal") {
+ OpTextProgress Prog(*_config);
+ return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false, &Prog);
+ }
pkgDepCache::ActionGroup group(Cache);
@@ -748,8 +752,10 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg)
bool pkgProblemResolver::Resolve(bool BrokenFix)
{
std::string const solver = _config->Find("APT::Solver::Name", "internal");
- if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache, false, false, false);
+ if (solver != "internal") {
+ OpTextProgress Prog(*_config);
+ return EDSP::ResolveExternal(solver.c_str(), Cache, false, false, false, &Prog);
+ }
return ResolveInternal(BrokenFix);
}
/*}}}*/
@@ -1223,8 +1229,10 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
bool pkgProblemResolver::ResolveByKeep()
{
std::string const solver = _config->Find("APT::Solver::Name", "internal");
- if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false);
+ if (solver != "internal") {
+ OpTextProgress Prog(*_config);
+ return EDSP::ResolveExternal(solver.c_str(), Cache, true, false, false, &Prog);
+ }
return ResolveByKeepInternal();
}
/*}}}*/