summaryrefslogtreecommitdiff
path: root/src/del.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-09-14 16:48:28 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-09-14 16:48:28 +0300
commit803f55ece50bea9f0f8120dbcfe8068f689d3703 (patch)
treec7a8fc8a878b04f2eb1e861628c172c482b1bc4c /src/del.c
parent6b1a55825a3bd229d5ea343ed47ac36f6ca91062 (diff)
downloadapk-tools-803f55ece50bea9f0f8120dbcfe8068f689d3703.tar.gz
apk-tools-803f55ece50bea9f0f8120dbcfe8068f689d3703.tar.bz2
apk-tools-803f55ece50bea9f0f8120dbcfe8068f689d3703.tar.xz
apk-tools-803f55ece50bea9f0f8120dbcfe8068f689d3703.zip
solver: make state pointers completely internal
the only bit of information needed in solver commit is the "hard" topology sorting information for trigger ordering. fixes a bug in "apk del" which uses the state pointers to do intermediate calculations between solution solving and commit.
Diffstat (limited to 'src/del.c')
-rw-r--r--src/del.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/del.c b/src/del.c
index dff4356..3d7ffe7 100644
--- a/src/del.c
+++ b/src/del.c
@@ -142,8 +142,7 @@ static int del_main(void *pctx, struct apk_database *db, int argc, char **argv)
delete_from_world, ctx);
}
- r = apk_solver_solve(db, APK_SOLVERF_KEEP_STATE,
- ctx->world, &solution, &changeset);
+ r = apk_solver_solve(db, 0, ctx->world, &solution, &changeset);
if (r == 0 || (apk_flags & APK_FORCE)) {
/* check for non-deleted package names */
for (i = 0; i < solution->num; i++) {
@@ -167,7 +166,6 @@ static int del_main(void *pctx, struct apk_database *db, int argc, char **argv)
} else {
apk_solver_print_errors(db, solution, ctx->world, r);
}
- apk_solver_free(db);
apk_package_array_free(&solution);
apk_dependency_array_free(&ctx->world);