upgrade: handle solver failure gracefully

It is internal bug, but don't segfault on it. Fixes #1576.
cute-signatures
Timo Teräs 2013-04-29 14:12:50 +03:00
parent 4d95266e4d
commit 4c08eca3bb
1 changed files with 1 additions and 1 deletions

View File

@ -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);