Default to "not found" for rpmtsSolve() + comment behavior
authorPanu Matilainen <pmatilai@redhat.com>
Sun, 14 Mar 2010 09:21:22 +0000 (11:21 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Sun, 14 Mar 2010 09:31:45 +0000 (11:31 +0200)
- this fixes the behavior when (as normally is the case) there is no
  depsolve callback set

lib/rpmts.c
lib/rpmts_internal.h

index b6b5093..e135cce 100644 (file)
@@ -476,7 +476,7 @@ int rpmtsSetSolveCallback(rpmts ts,
 
 int rpmtsSolve(rpmts ts, rpmds key)
 {
-    int rc = 0;
+    int rc = 1; /* assume not found */
     if (ts && ts->solve) {
        rc = (*ts->solve)(ts, key, ts->solveData);
     }
index 7d7b0e6..d73d2b0 100644 (file)
@@ -74,6 +74,7 @@ struct rpmts_s {
 RPM_GNUC_INTERNAL
 tsMembers rpmtsMembers(rpmts ts);
 
+/* returns -1 for retry, 0 for ignore and 1 for not found */
 RPM_GNUC_INTERNAL
 int rpmtsSolve(rpmts ts, rpmds key);