summaryrefslogtreecommitdiff
path: root/apt-pkg/upgrade.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-08 11:34:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-08 13:09:42 +0200
commit3a487cc03dec3488d0fa3008d04747bb1b4b0baf (patch)
treef019a4ff447f4c14dfc7748c4ef1bdcd62261428 /apt-pkg/upgrade.cc
parent4dc619c0435d44a6a03cfda357654d3d76833b68 (diff)
edsp: if logging is requested, do it for internal, too
Create and log the EDSP(like) request even if we use the internal resolver.
Diffstat (limited to 'apt-pkg/upgrade.cc')
-rw-r--r--apt-pkg/upgrade.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index c3be9b64f..afc9ad613 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -27,8 +27,9 @@
static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
+ auto const ret = EDSP::ResolveExternal(solver.c_str(), Cache, EDSP::Request::UPGRADE_ALL, Progress);
if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache, EDSP::Request::UPGRADE_ALL, Progress);
+ return ret;
if (Progress != NULL)
Progress->OverallProgress(0, 100, 1, _("Calculating upgrade"));
@@ -129,10 +130,10 @@ bool pkgDistUpgrade(pkgDepCache &Cache)
static bool pkgAllUpgradeNoNewPackages(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
+ constexpr auto flags = EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_NEW_INSTALL | EDSP::Request::FORBID_REMOVE;
+ auto const ret = EDSP::ResolveExternal(solver.c_str(), Cache, flags, Progress);
if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache,
- EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_NEW_INSTALL | EDSP::Request::FORBID_REMOVE,
- Progress);
+ return ret;
if (Progress != NULL)
Progress->OverallProgress(0, 100, 1, _("Calculating upgrade"));
@@ -173,10 +174,10 @@ static bool pkgAllUpgradeNoNewPackages(pkgDepCache &Cache, OpProgress * const Pr
static bool pkgAllUpgradeWithNewPackages(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
+ constexpr auto flags = EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_REMOVE;
+ auto const ret = EDSP::ResolveExternal(solver.c_str(), Cache, flags, Progress);
if (solver != "internal")
- return EDSP::ResolveExternal(solver.c_str(), Cache,
- EDSP::Request::UPGRADE_ALL | EDSP::Request::FORBID_REMOVE,
- Progress);
+ return ret;
if (Progress != NULL)
Progress->OverallProgress(0, 100, 1, _("Calculating upgrade"));