From 72e67fee7a06fe783966a855a7a656df77819b82 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 15 Jun 2014 17:23:22 +0200 Subject: [PATCH] Solver: Add more (optional) debugging output Signed-off-by: Niels Thykier --- installability/solver.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/installability/solver.py b/installability/solver.py index be2fd93..cc5acee 100644 --- a/installability/solver.py +++ b/installability/solver.py @@ -78,6 +78,9 @@ class InstallabilitySolver(InstallabilityTester): for r in rms: ptable[r] = key + if debug_solver > 1: + self._dump_groups(groups) + # This large loop will add ordering constrains on each "item" # that migrates based on various rules. for (item, adds, rms) in groups: @@ -297,3 +300,9 @@ class InstallabilitySolver(InstallabilityTester): return result + def _dump_groups(self, groups): + print "N: === Groups ===" + for (item, adds, rms) in groups: + print "N: %s => A: %s, R: %s" % (str(item), str(adds), str(rms)) + print "N: === END Groups ===" +