summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-12 16:24:30 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-14 19:08:45 +0100
commit3c778d92e91d0e0ca5b4196e6900dee92a7b66bb (patch)
tree7e14eb374b564b8ae2ca56a6bebc112f3cc8dcd7
parent87f55c2bf50bbe4ba66e50e3b8bacd6d841fd1ab (diff)
solver3: Refactor a debug message
Use Var::toString() to print the variable, instead of duplicating the code :D
-rw-r--r--apt-pkg/solver3.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc
index 8d80dfb3c..06008fb5d 100644
--- a/apt-pkg/solver3.cc
+++ b/apt-pkg/solver3.cc
@@ -648,12 +648,7 @@ void APT::Solver::UndoOne()
if (not solvedItem.assigned.empty())
{
if (unlikely(debug >= 4))
- {
- if (auto P = solvedItem.assigned.Pkg(cache); not P.end())
- std::cerr << "Unassign " << P.FullName() << "\n";
- if (auto V = solvedItem.assigned.Ver(cache); not V.end())
- std::cerr << "Unassign " << V.ParentPkg().FullName() << "=" << V.VerStr() << "\n";
- }
+ std::cerr << "Unassign " << solvedItem.assigned.toString(cache) << "\n";
auto &state = (*this)[solvedItem.assigned];
state.decision = Decision::NONE;
state.reason = Var();