diff options
author | Michael Schroeder <mls@suse.de> | 2013-10-16 18:15:53 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-10-16 18:15:53 +0200 |
commit | 733946741535986d2bb107248ff3e20ebea617a8 (patch) | |
tree | 42b95c14a441a62045391528592efec8aa07ee3b /src | |
parent | ca11fec4bb48013ef602e5bec1b776c738c5075e (diff) | |
download | libsolv-733946741535986d2bb107248ff3e20ebea617a8.tar.gz libsolv-733946741535986d2bb107248ff3e20ebea617a8.tar.bz2 libsolv-733946741535986d2bb107248ff3e20ebea617a8.zip |
fix a bug in the application link code
Diffstat (limited to 'src')
-rw-r--r-- | src/linkedpkg.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/linkedpkg.c b/src/linkedpkg.c index 45a0c80..445d315 100644 --- a/src/linkedpkg.c +++ b/src/linkedpkg.c @@ -23,7 +23,7 @@ * created from product data in the repository (which is generated from files * in /etc/products.d. In the future we may switch to using product() * provides of packages. - * + * * pattern: * created from pattern() provides of packages. * @@ -82,16 +82,16 @@ find_application_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp FOR_PROVIDES(p, pp, req) if (pool->solvables[p].repo == s->repo) queue_push(qr, p); - if (reqidp) - *reqidp = req; if (qp) { FOR_PROVIDES(p, pp, prv) if (pool->solvables[p].repo == s->repo) queue_push(qp, pp); - if (prvidp) - *prvidp = req; } + if (reqidp) + *reqidp = req; + if (prvidp) + *prvidp = prv; } void @@ -169,7 +169,7 @@ find_product_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp, Qu dataiterator_free(&di); } } - else + else if (qp) { /* find qp */ FOR_PROVIDES(p, pp, s->name) @@ -236,11 +236,11 @@ find_autopattern_name(Pool *pool, Solvable *s) return 0; for (prvp = s->repo->idarraydata + s->provides; (prv = *prvp++) != 0; ) if (ISRELDEP(prv)) - { + { Reldep *rd = GETRELDEP(pool, prv); if (rd->flags == REL_EQ && !strcmp(pool_id2str(pool, rd->name), "autopattern()")) return strncmp(pool_id2str(pool, rd->evr), "pattern:", 8) != 0 ? rd->evr : 0; - } + } return 0; } |