summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2018-11-30 12:41:09 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2018-11-30 12:41:10 +0900
commitce3d4f8072b41fd5eb64807a3616c7b30f10436c (patch)
tree79514e8716aef123d14338a2e1a4578b930d4e7e /examples
parent5390c526e6b93e97d269cb8a75a699631e5bb189 (diff)
downloadlibsolv-ce3d4f8072b41fd5eb64807a3616c7b30f10436c.tar.gz
libsolv-ce3d4f8072b41fd5eb64807a3616c7b30f10436c.tar.bz2
libsolv-ce3d4f8072b41fd5eb64807a3616c7b30f10436c.zip
Imported Upstream version 0.6.32upstream/0.6.32
Change-Id: If9ec9c33d3506d0e19971d6b06312bb4e7fa7e28 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/solv/fileconflicts.c7
-rw-r--r--examples/solv/solv.c9
2 files changed, 12 insertions, 4 deletions
diff --git a/examples/solv/fileconflicts.c b/examples/solv/fileconflicts.c
index 982de85..2d45bc4 100644
--- a/examples/solv/fileconflicts.c
+++ b/examples/solv/fileconflicts.c
@@ -67,7 +67,12 @@ checkfileconflicts(Pool *pool, Queue *checkq, int newpkgs, FILE **newpkgsfps, Qu
{
printf("\n");
for (i = 0; i < conflicts->count; i += 6)
- printf("file %s of package %s conflicts with package %s\n", pool_id2str(pool, conflicts->elements[i]), pool_solvid2str(pool, conflicts->elements[i + 1]), pool_solvid2str(pool, conflicts->elements[i + 4]));
+ {
+ if (conflicts->elements[i] == conflicts->elements[i + 3])
+ printf("file %s of package %s conflicts with package %s\n", pool_id2str(pool, conflicts->elements[i]), pool_solvid2str(pool, conflicts->elements[i + 1]), pool_solvid2str(pool, conflicts->elements[i + 4]));
+ else
+ printf("file %s of package %s conflicts with file %s of package %s\n", pool_id2str(pool, conflicts->elements[i]), pool_solvid2str(pool, conflicts->elements[i + 1]), pool_id2str(pool, conflicts->elements[i + 3]), pool_solvid2str(pool, conflicts->elements[i + 4]));
+ }
printf("\n");
}
return conflicts->count;
diff --git a/examples/solv/solv.c b/examples/solv/solv.c
index bc9d87f..627c248 100644
--- a/examples/solv/solv.c
+++ b/examples/solv/solv.c
@@ -661,10 +661,10 @@ main(int argc, char **argv)
job.elements[i] |= SOLVER_FORCEBEST;
}
+#if 0
// multiversion test
- // queue_push2(&job, SOLVER_MULTIVERSION|SOLVER_SOLVABLE_NAME, pool_str2id(pool, "kernel-pae", 1));
- // queue_push2(&job, SOLVER_MULTIVERSION|SOLVER_SOLVABLE_NAME, pool_str2id(pool, "kernel-pae-base", 1));
- // queue_push2(&job, SOLVER_MULTIVERSION|SOLVER_SOLVABLE_NAME, pool_str2id(pool, "kernel-pae-extra", 1));
+ queue_push2(&job, SOLVER_MULTIVERSION|SOLVER_SOLVABLE_PROVIDES, pool_str2id(pool, "multiversion(kernel)", 1));
+#endif
#if 0
queue_push2(&job, SOLVER_INSTALL|SOLVER_SOLVABLE_PROVIDES, pool_rel2id(pool, NAMESPACE_LANGUAGE, 0, REL_NAMESPACE, 1));
queue_push2(&job, SOLVER_ERASE|SOLVER_CLEANDEPS|SOLVER_SOLVABLE_PROVIDES, pool_rel2id(pool, NAMESPACE_LANGUAGE, 0, REL_NAMESPACE, 1));
@@ -673,6 +673,9 @@ main(int argc, char **argv)
rerunsolver:
solv = solver_create(pool);
solver_set_flag(solv, SOLVER_FLAG_SPLITPROVIDES, 1);
+#if 0
+ solver_set_flag(solv, SOLVER_FLAG_IGNORE_RECOMMENDED, 1);
+#endif
#if defined(FEDORA) || defined(MAGEIA)
solver_set_flag(solv, SOLVER_FLAG_ALLOW_VENDORCHANGE, 1);
#endif