test-driver.c
changeset 209 78afac5bb7b8
parent 196 b38fc517ea04
child 210 c78f677d96b8
     1.1 --- a/test-driver.c	Mon Apr 07 00:06:22 2008 -0400
     1.2 +++ b/test-driver.c	Tue Apr 08 00:10:31 2008 -0400
     1.3 @@ -252,13 +252,21 @@
     1.4  static void
     1.5  end_transaction(struct test_context *ctx)
     1.6  {
     1.7 -	int errors;
     1.8 +	struct razor_package *pkg;
     1.9 +	int errors, i;
    1.10  
    1.11 -	ctx->trans = razor_transaction_create(ctx->system_set, ctx->repo_set,
    1.12 -					      ctx->n_install_pkgs,
    1.13 -					      (const char **)ctx->install_pkgs,
    1.14 -					      ctx->n_remove_pkgs,
    1.15 -					      (const char **)ctx->remove_pkgs);
    1.16 +	ctx->trans = razor_transaction_create(ctx->system_set, ctx->repo_set);
    1.17 +	for (i = 0; i < ctx->n_install_pkgs; i++) {
    1.18 +		pkg = razor_set_get_package(ctx->repo_set,
    1.19 +					    ctx->install_pkgs[i]);
    1.20 +		razor_transaction_install_package(ctx->trans, pkg);
    1.21 +	}		
    1.22 +	for (i = 0; i < ctx->n_remove_pkgs; i++) {
    1.23 +		pkg = razor_set_get_package(ctx->repo_set,
    1.24 +					    ctx->remove_pkgs[i]);
    1.25 +		razor_transaction_remove_package(ctx->trans, pkg);
    1.26 +	}		
    1.27 +
    1.28  	errors = razor_transaction_describe(ctx->trans);
    1.29  	printf("\n");
    1.30