diff options
Diffstat (limited to 'src/upgrade.c')
-rw-r--r-- | src/upgrade.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/upgrade.c b/src/upgrade.c index dd53c19..541fbf3 100644 --- a/src/upgrade.c +++ b/src/upgrade.c @@ -52,7 +52,8 @@ int apk_do_self_upgrade(struct apk_database *db, unsigned short solver_flags) apk_solver_set_name_flags(name, solver_flags); db->performing_self_update = 1; - r = apk_solver_solve(db, 0, db->world, &solution, &changeset); + r = apk_solver_solve(db, APK_SOLVERF_KEEP_STATE, + db->world, &solution, &changeset); if (r != 0) { if (apk_flags & APK_FORCE) r = 0; @@ -71,6 +72,7 @@ int apk_do_self_upgrade(struct apk_database *db, unsigned short solver_flags) apk_message("Upgrading critical system libraries and apk-tools:"); apk_solver_commit_changeset(db, &changeset, db->world); + apk_solver_free(db); apk_db_close(db); apk_message("Continuing the upgrade transaction with new apk-tools:"); @@ -83,6 +85,7 @@ int apk_do_self_upgrade(struct apk_database *db, unsigned short solver_flags) exit(1); ret: + apk_solver_free(db); apk_package_array_free(&solution); apk_change_array_free(&changeset.changes); db->performing_self_update = 0; |