diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-02-16 10:50:52 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-02-16 10:57:52 +0200 |
commit | 0800d7e050b738e7faa848291d6021175b853e29 (patch) | |
tree | 70d5709e8b87ad49fd3661d4eaf727d025b039d6 /src/apk_solver.h | |
parent | 7399f1950f5418dc7942579d5e9ed9807c764cce (diff) | |
download | aports-0800d7e050b738e7faa848291d6021175b853e29.tar.bz2 aports-0800d7e050b738e7faa848291d6021175b853e29.tar.xz |
solver: record repository tag, and flags in solution
name state could get overwritten later, so we can't use that when
generating the changeset.
Diffstat (limited to 'src/apk_solver.h')
-rw-r--r-- | src/apk_solver.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/apk_solver.h b/src/apk_solver.h index 7dd29144ac..4ecb9a7427 100644 --- a/src/apk_solver.h +++ b/src/apk_solver.h @@ -12,10 +12,18 @@ #ifndef APK_SOLVER_H #define APK_SOLVER_H +struct apk_solution_entry { + struct apk_package *pkg; + unsigned short repository_tag : 15; + unsigned reinstall : 1; +}; +APK_ARRAY(apk_solution_array, struct apk_solution_entry); + struct apk_change { struct apk_package *oldpkg; struct apk_package *newpkg; - unsigned short repository_tag; + unsigned short repository_tag : 15; + unsigned reinstall : 1; }; APK_ARRAY(apk_change_array, struct apk_change); @@ -33,13 +41,13 @@ void apk_solver_set_name_flags(struct apk_name *name, int apk_solver_solve(struct apk_database *db, unsigned short solver_flags, struct apk_dependency_array *world, - struct apk_package_array **solution, + struct apk_solution_array **solution, struct apk_changeset *changeset); int apk_solver_commit_changeset(struct apk_database *db, struct apk_changeset *changeset, struct apk_dependency_array *world); void apk_solver_print_errors(struct apk_database *db, - struct apk_package_array *solution, + struct apk_solution_array *solution, struct apk_dependency_array *world, int unsatisfiable); int apk_solver_commit(struct apk_database *db, |