summaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-16 10:50:52 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-16 10:57:52 +0200
commit0800d7e050b738e7faa848291d6021175b853e29 (patch)
tree70d5709e8b87ad49fd3661d4eaf727d025b039d6 /src/test.c
parent7399f1950f5418dc7942579d5e9ed9807c764cce (diff)
downloadapk-tools-0800d7e050b738e7faa848291d6021175b853e29.tar.gz
apk-tools-0800d7e050b738e7faa848291d6021175b853e29.tar.bz2
apk-tools-0800d7e050b738e7faa848291d6021175b853e29.tar.xz
apk-tools-0800d7e050b738e7faa848291d6021175b853e29.zip
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/test.c')
-rw-r--r--src/test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test.c b/src/test.c
index 4ec6bcf..8f34429 100644
--- a/src/test.c
+++ b/src/test.c
@@ -119,7 +119,7 @@ static void print_dep_errors(struct apk_database *db, char *label, struct apk_de
}
static void print_errors_in_solution(struct apk_database *db, int unsatisfiable,
- struct apk_package_array *solution)
+ struct apk_solution_array *solution)
{
int i;
@@ -127,15 +127,15 @@ static void print_errors_in_solution(struct apk_database *db, int unsatisfiable,
unsatisfiable, solution->num);
for (i = 0; i < solution->num; i++) {
- struct apk_package *pkg = solution->item[i];
+ struct apk_package *pkg = solution->item[i].pkg;
pkg->name->state_ptr = pkg;
}
print_dep_errors(db, "world", db->world);
for (i = 0; i < solution->num; i++) {
- struct apk_package *pkg = solution->item[i];
+ struct apk_package *pkg = solution->item[i].pkg;
char pkgtext[256];
- snprintf(pkgtext, sizeof(pkgtext), PKG_VER_FMT, PKG_VER_PRINTF(solution->item[i]));
+ snprintf(pkgtext, sizeof(pkgtext), PKG_VER_FMT, PKG_VER_PRINTF(pkg));
print_dep_errors(db, pkgtext, pkg->depends);
}
@@ -145,7 +145,7 @@ static int test_main(void *pctx, struct apk_database *db, int argc, char **argv)
{
struct test_ctx *ctx = (struct test_ctx *) pctx;
struct apk_bstream *bs;
- struct apk_package_array *solution = NULL;
+ struct apk_solution_array *solution = NULL;
struct apk_changeset changeset = {};
apk_blob_t b;
int i, r;