]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add SOLVABLE_NAME hack for pool_whatmatchesdep and solvable_matchesdep
authorMichael Schroeder <mls@suse.de>
Thu, 17 Nov 2016 13:45:43 +0000 (14:45 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 17 Nov 2016 13:45:43 +0000 (14:45 +0100)
src/pool.c
src/solvable.c

index cd59b5f8d7455644d73af9fcf33fbc7145dd1a76..1adf70e33b4b27a02292c2c7c4d66c6c24049681 100644 (file)
@@ -1335,6 +1335,14 @@ pool_whatmatchesdep(Pool *pool, Id keyname, Id dep, Queue *q, int marker)
   int i;
 
   queue_empty(q);
+  if (keyname == SOLVABLE_NAME)
+    {
+      Id pp;
+      FOR_PROVIDES(p, pp, dep)
+        if (pool_match_dep(pool, p, dep))
+         queue_push(q, p);
+      return;
+    }
   queue_init(&qq);
   FOR_POOL_SOLVABLES(p)
     {
index 2570e4fde2054b1e2f2de88f5bc1f5e881f47f63..6f6ba1de2d0bda0ae3e0ca7834b96d954ae89ff8 100644 (file)
@@ -601,6 +601,9 @@ solvable_matchesdep(Solvable *s, Id keyname, Id dep, int marker)
   int i;
   Pool *pool = s->repo->pool;
   Queue q;
+
+  if (keyname == SOLVABLE_NAME)
+    return pool_match_nevr(pool, s, dep) ? 1 : 0;      /* nevr match hack */
   queue_init(&q);
   solvable_lookup_deparray(s, keyname, &q, marker);
   for (i = 0; i < q.count; i++)