]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Enable debugging for pool/solver
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Apr 2021 08:56:16 +0000 (08:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Apr 2021 08:56:16 +0000 (08:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pakfire.c
src/libpakfire/request.c

index a89058e103dbcf2700f119aed7e881f881774c96..07a9d533d9caf8dd4677e7e552c2562f6593334e 100644 (file)
@@ -328,8 +328,9 @@ static int pakfire_populate_pool(Pakfire pakfire) {
        Pool* pool = pakfire->pool = pool_create();
        pool_setdisttype(pool, DISTTYPE_RPM);
 
-#ifdef SOLVER_DEBUG
-       pool_setdebuglevel(pool, 1);
+#ifdef ENABLE_DEBUG
+       // Enable debug output
+       pool_setdebuglevel(pool, 2);
 #endif
 
        // Set architecture of the pool
index 7f8dd33cf7dc54f6d884982c713aecbdb8841987..b4aa299a318007d36566036482dbb3a3781e1b1d 100644 (file)
@@ -25,7 +25,7 @@
 #include <solv/solver.h>
 #include <solv/transaction.h>
 
-#ifdef SOLVER_DEBUG
+#ifdef ENABLE_DEBUG
 # include <solv/solverdebug.h>
 #endif
 
@@ -147,7 +147,7 @@ static int solve(struct pakfire_request* request, Queue* queue) {
        clock_t solving_start = clock();
 
        if (solver_solve(request->solver, queue)) {
-#ifdef SOLVER_DEBUG
+#ifdef ENABLE_DEBUG
                solver_printallsolutions(request->solver);
 #endif
 
@@ -160,6 +160,10 @@ static int solve(struct pakfire_request* request, Queue* queue) {
        DEBUG(request->pakfire, "Solved request in %.4fms\n",
                (double)(solving_end - solving_start) * 1000 / CLOCKS_PER_SEC);
 
+#ifdef ENABLE_DEBUG
+       solver_printdecisions(request->solver);
+#endif
+
        /* If the solving process was successful, we get the transaction
         * from the solver. */
        request->transaction = solver_create_transaction(request->solver);