diff options
author | Michael Schroeder <mls@suse.de> | 2011-05-25 15:28:34 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2011-05-25 15:28:34 +0200 |
commit | 66e7a252604ae81a027a2c7b8c437b7228eddcc4 (patch) | |
tree | a44aafbdb3a2cba25f6581f409b779a7354b93cf /tools | |
parent | 55f5371d10bc44570b2d50bb737aba8a3ae1e93f (diff) | |
download | libsolv-66e7a252604ae81a027a2c7b8c437b7228eddcc4.tar.gz libsolv-66e7a252604ae81a027a2c7b8c437b7228eddcc4.tar.bz2 libsolv-66e7a252604ae81a027a2c7b8c437b7228eddcc4.zip |
- add solver_private.h, make repo_ functions return an int, make solver_solv return the problem count
Diffstat (limited to 'tools')
-rw-r--r-- | tools/findfileconflicts.c | 8 | ||||
-rw-r--r-- | tools/installcheck.c | 5 | ||||
-rw-r--r-- | tools/patchcheck.c | 10 |
3 files changed, 11 insertions, 12 deletions
diff --git a/tools/findfileconflicts.c b/tools/findfileconflicts.c index 9c5a1a5..9d7f1a2 100644 --- a/tools/findfileconflicts.c +++ b/tools/findfileconflicts.c @@ -54,18 +54,20 @@ int main() if (conflicts.count) { Queue job; + int problemcnt; + queue_init(&job); pool_add_fileconflicts_deps(pool, &conflicts); pool_addfileprovides(pool); pool_createwhatprovides(pool); pool_setdebuglevel(pool, 0); Solver *solv = solver_create(pool); - solv->fixsystem = 1; + queue_push2(&job, SOLVER_VERIFY|SOLVER_SOLVABLE_ALL, 0); #if 0 solv->allowuninstall = 1; #endif - solver_solve(solv, &job); - if (solv->problems.count) + problemcnt = solver_solve(solv, &job); + if (problemcnt) solver_printallsolutions(solv); else solver_printtransaction(solv); diff --git a/tools/installcheck.c b/tools/installcheck.c index 7d9e286..91eeab0 100644 --- a/tools/installcheck.c +++ b/tools/installcheck.c @@ -242,6 +242,7 @@ main(int argc, char **argv) for (i = 0; i < cand.count; i++) { Solvable *s; + int problemcount; p = cand.elements[i]; if (nocheck && p >= nocheck) @@ -282,8 +283,8 @@ main(int argc, char **argv) queue_push(&job, archlock); } solv->dontinstallrecommended = 1; - solver_solve(solv, &job); - if (solv->problems.count) + problemcount = solver_solve(solv, &job); + if (problemcount) { Id problem = 0; Solvable *s2; diff --git a/tools/patchcheck.c b/tools/patchcheck.c index c107c6c..ce8d8cd 100644 --- a/tools/patchcheck.c +++ b/tools/patchcheck.c @@ -290,8 +290,7 @@ test_all_packages_installable(context_t *c, Id pid) solv = solver_create(pool); solv->dontinstallrecommended = 0; ++solver_runs; - solver_solve(solv, &job); - if (solv->problems.count) + if (solver_solve(solv, &job)) { c->status = 1; printf("error installing original package\n"); @@ -320,8 +319,7 @@ test_all_packages_installable(context_t *c, Id pid) solv = solver_create(pool); /*solv->dontinstallrecommended = 1;*/ ++solver_runs; - solver_solve(solv, &job); - if (solv->problems.count) + if (solver_solve(solv, &job)) { c->status = 1; showproblems(solv, s, 0, 0); @@ -420,9 +418,7 @@ test_can_upgrade_all_packages(context_t *c, Id pid) solv = solver_create(pool); solv->dontinstallrecommended = 1; ++solver_runs; - solver_solve(solv, &job); - - if (solv->problems.count) + if (solver_solve(solv, &job)) { c->status = 1; showproblems(solv, s, &cand, &badguys); |