summaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-10-18 18:11:26 -0400
committerTimo Teräs <timo.teras@iki.fi>2011-10-18 18:11:26 -0400
commita787038dbe643a7169a4b3610e104ac94b175ed0 (patch)
tree93e0e6629d805cdef6fa5833100ed0366225b019 /src/test.c
parentafd854a3e2cf20b3f35c5503c9df9589f482dc74 (diff)
downloadapk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.tar.gz
apk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.tar.bz2
apk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.tar.xz
apk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.zip
pkg, info: remember installed packages "replaces"
"replaces" is now turned to a full dependency type list, so you can make package overwrite files only certain versions of the package (though, we should probably take this into account already at solution calculation phase). Also make 'info --replaces' print the "replaces" of the package. This is in preparation for the policy package support, which still requires "replacement priority" field to decide which packages' files get the preference.
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test.c b/src/test.c
index dec5bb0..9fc3e1f 100644
--- a/src/test.c
+++ b/src/test.c
@@ -147,6 +147,7 @@ static int test_main(void *pctx, struct apk_database *db, int argc, char **argv)
struct apk_bstream *bs;
struct apk_package_array *solution = NULL;
struct apk_changeset changeset = {};
+ apk_blob_t b;
int i, r;
if (argc != 1)
@@ -173,7 +174,8 @@ static int test_main(void *pctx, struct apk_database *db, int argc, char **argv)
}
/* construct new world */
- apk_deps_parse(db, &db->world, APK_BLOB_STR(argv[0]));
+ b = APK_BLOB_STR(argv[0]);
+ apk_blob_pull_deps(&b, db, &db->world);
/* run solver */
r = apk_solver_solve(db, ctx->solver_flags, db->world, &solution, &changeset);