diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-09-14 16:48:28 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-09-14 16:48:28 +0300 |
commit | 803f55ece50bea9f0f8120dbcfe8068f689d3703 (patch) | |
tree | c7a8fc8a878b04f2eb1e861628c172c482b1bc4c /src/upgrade.c | |
parent | 6b1a55825a3bd229d5ea343ed47ac36f6ca91062 (diff) | |
download | apk-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/upgrade.c')
-rw-r--r-- | src/upgrade.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/upgrade.c b/src/upgrade.c index 541fbf3..dd53c19 100644 --- a/src/upgrade.c +++ b/src/upgrade.c @@ -52,8 +52,7 @@ 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, APK_SOLVERF_KEEP_STATE, - db->world, &solution, &changeset); + r = apk_solver_solve(db, 0, db->world, &solution, &changeset); if (r != 0) { if (apk_flags & APK_FORCE) r = 0; @@ -72,7 +71,6 @@ 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:"); @@ -85,7 +83,6 @@ 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; |