diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-09-09 16:31:11 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-09-09 16:32:31 +0300 |
commit | a5a7021658212748e9f787ce23181d3e099aba73 (patch) | |
tree | 459384995fc52f096007c3ed4d8d88ca865f998c /src/apk_solver.h | |
parent | 0e24207c2e4fedb9c0656ed98bc37cd37df44d91 (diff) | |
download | apk-tools-a5a7021658212748e9f787ce23181d3e099aba73.tar.gz apk-tools-a5a7021658212748e9f787ce23181d3e099aba73.tar.bz2 apk-tools-a5a7021658212748e9f787ce23181d3e099aba73.tar.xz apk-tools-a5a7021658212748e9f787ce23181d3e099aba73.zip |
applets: start using solver code
still todo:
- 'fix' is missing
- 'del -R' does not work
- 'upgrade' does not do self-upgrade first
... and a lot of testing.
Diffstat (limited to 'src/apk_solver.h')
-rw-r--r-- | src/apk_solver.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/apk_solver.h b/src/apk_solver.h index f634b2f..5ab3147 100644 --- a/src/apk_solver.h +++ b/src/apk_solver.h @@ -22,12 +22,19 @@ struct apk_changeset { struct apk_change_array *changes; }; -void apk_solver_sort(struct apk_database *db); -int apk_solver_solve(struct apk_database *db, struct apk_dependency_array *world, - struct apk_package_array **solution, int allow_errors); -int apk_solver_generate_changeset(struct apk_database *db, - struct apk_package_array *solution, - struct apk_changeset *changeset); +#define APK_SOLVERF_UPGRADE 0x0001 +#define APK_SOLVERF_AVAILABLE 0x0002 +#define APK_SOLVERF_REINSTALL 0x0004 + +int apk_solver_solve(struct apk_database *db, + unsigned short solver_flags, + struct apk_dependency_array *world, + struct apk_package_array **solution, + struct apk_changeset *changeset); + +int apk_solver_commit(struct apk_database *db, + unsigned short solver_flags, + struct apk_dependency_array *world); #endif |