summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-10-26 14:42:13 +0200
committerMichael Schroeder <mls@suse.de>2012-10-26 14:42:13 +0200
commit68c7ba0920556da5d97315f8077b8d996236d0ba (patch)
treeb526735653d56ed7ba5decb4b7b92fb1b916ad3f /examples
parente4baafbc3b96a10cecd36571a865b9fe538db2b7 (diff)
downloadlibsolv-68c7ba0920556da5d97315f8077b8d996236d0ba.tar.gz
libsolv-68c7ba0920556da5d97315f8077b8d996236d0ba.tar.bz2
libsolv-68c7ba0920556da5d97315f8077b8d996236d0ba.zip
add pool_job2solvables and selection_solvables
Diffstat (limited to 'examples')
-rw-r--r--examples/solv.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/solv.c b/examples/solv.c
index 42791ac..a40e6d0 100644
--- a/examples/solv.c
+++ b/examples/solv.c
@@ -2718,12 +2718,16 @@ main(int argc, char **argv)
if (mainmode == MODE_LIST || mainmode == MODE_INFO)
{
/* list mode, no solver needed */
+ Queue q;
+ queue_init(&q);
for (i = 0; i < job.count; i += 2)
{
- Id how = job.elements[i] & SOLVER_SELECTMASK;
- FOR_JOB_SELECT(p, pp, how, job.elements[i + 1])
+ int j;
+ queue_empty(&q);
+ pool_job2solvables(pool, &q, job.elements[i], job.elements[i + 1]);
+ for (j = 0; j < q.count; j++)
{
- Solvable *s = pool_id2solvable(pool, p);
+ Solvable *s = pool_id2solvable(pool, q.elements[j]);
if (mainmode == MODE_INFO)
{
const char *str;
@@ -2752,6 +2756,7 @@ main(int argc, char **argv)
}
}
}
+ queue_free(&q);
queue_free(&job);
pool_free(pool);
free_repoinfos(repoinfos, nrepoinfos);