summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-12 17:00:43 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-13 18:22:00 +0300
commit25ff68a87e3264b6dfdc846823d4912b4dd870b2 (patch)
treecd0d63eba30d233f52d5bed6e8a89cb64bf7de82 /src/commit.c
parent59678309ea7350a159a3f5ee61c2fb5218dee6d5 (diff)
downloadapk-tools-25ff68a87e3264b6dfdc846823d4912b4dd870b2.tar.gz
apk-tools-25ff68a87e3264b6dfdc846823d4912b4dd870b2.tar.bz2
apk-tools-25ff68a87e3264b6dfdc846823d4912b4dd870b2.tar.xz
apk-tools-25ff68a87e3264b6dfdc846823d4912b4dd870b2.zip
solver: prune broken world dependencies with --force
mostly useful for reboot, when all packages are not available.
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/commit.c b/src/commit.c
index f0e9e84..f426ba0 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -536,17 +536,11 @@ int apk_solver_commit(struct apk_database *db,
}
r = apk_solver_solve(db, solver_flags, world, &changeset);
- if (r < 0)
- return r;
-
- if (r == 0 || (apk_flags & APK_FORCE)) {
- /* Success -- or forced installation of bad graph */
+ if (r == 0)
r = apk_solver_commit_changeset(db, &changeset, world);
- } else {
- /* Failure -- print errors */
+ else
apk_solver_print_errors(db, &changeset, world);
- }
- apk_change_array_free(&changeset.changes);
+ apk_change_array_free(&changeset.changes);
return r;
}