]> git.ipfire.org Git - pakfire.git/commitdiff
request: Throw unknown things into solver
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 26 Jun 2021 13:21:48 +0000 (13:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 26 Jun 2021 13:21:48 +0000 (13:21 +0000)
This will give us a list of problems which is more flexible than
breaking immediately after not being able to find a match

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/request.c

index 51ea7d83e6b8de2a45be95b57d9bb51704492fbc..cd9b67be327fd58ddc818add504af560f0d095ef 100644 (file)
@@ -375,8 +375,11 @@ static int pakfire_request_add_job(struct pakfire_request* request, int action,
 
        // Did we find anything?
        if (jobs.count == 0) {
-               ERROR(request->pakfire, "No match for '%s'\n", what);
-               return 1;
+               Id id = pakfire_parse_dep(request->pakfire, what);
+               if (!id)
+                       return 1;
+
+               queue_push2(&jobs, SOLVER_SOLVABLE_PROVIDES, id);
        }
 
        DEBUG(request->pakfire, "Found %d match(es) for '%s'\n", jobs.count / 2, what);