Commit 4c08eca3 authored by Timo Teräs's avatar Timo Teräs

upgrade: handle solver failure gracefully

It is internal bug, but don't segfault on it. Fixes #1576.
parent 4d95266e
......@@ -54,7 +54,7 @@ int apk_do_self_upgrade(struct apk_database *db, unsigned short solver_flags)
r = apk_solver_solve(db, 0, db->world, &solution, &changeset);
if (r != 0) {
if (apk_flags & APK_FORCE)
if ((r > 0) && (apk_flags & APK_FORCE))
r = 0;
else
apk_solver_print_errors(db, solution, db->world, r);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment