summaryrefslogtreecommitdiff
path: root/src/add.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-09-13 11:47:34 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-09-13 11:47:34 +0300
commitc6d9962d818abd557cf25a686ea96fcf1315bc8c (patch)
treeb6f97354c5c977994f8bfe1dfac8e3917cca79fc /src/add.c
parentb42421722ea94ba813f6a7a30f344a6792a6bb45 (diff)
downloadapk-tools-c6d9962d818abd557cf25a686ea96fcf1315bc8c.tar.gz
apk-tools-c6d9962d818abd557cf25a686ea96fcf1315bc8c.tar.bz2
apk-tools-c6d9962d818abd557cf25a686ea96fcf1315bc8c.tar.xz
apk-tools-c6d9962d818abd557cf25a686ea96fcf1315bc8c.zip
solver: add per-name specific flags, and fix the fix applet
Diffstat (limited to 'src/add.c')
-rw-r--r--src/add.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/add.c b/src/add.c
index a572c74..057d6cf 100644
--- a/src/add.c
+++ b/src/add.c
@@ -112,15 +112,19 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv)
return -1;
}
- if (virtpkg)
- apk_deps_add(&virtpkg->depends, &dep);
- else
+ if (virtpkg == NULL) {
apk_deps_add(&world, &dep);
+ apk_solver_set_name_flags(dep.name, actx->solver_flags);
+ } else {
+ apk_deps_add(&virtpkg->depends, &dep);
+ }
}
- if (virtpkg)
+ if (virtpkg) {
apk_deps_add(&world, &virtdep);
+ apk_solver_set_name_flags(virtdep.name, actx->solver_flags);
+ }
- r = apk_solver_commit(db, actx->solver_flags, world);
+ r = apk_solver_commit(db, 0, world);
apk_dependency_array_free(&world);
return r;