diff options
-rw-r--r-- | lib/rpmps.c | 37 | ||||
-rw-r--r-- | lib/rpmps.h | 17 | ||||
-rw-r--r-- | lib/rpmts.h | 2 | ||||
-rw-r--r-- | lib/transaction.c | 7 |
4 files changed, 3 insertions, 60 deletions
diff --git a/lib/rpmps.c b/lib/rpmps.c index 7f089af77..7107e3922 100644 --- a/lib/rpmps.c +++ b/lib/rpmps.c @@ -139,43 +139,6 @@ void rpmpsAppendProblem(rpmps ps, rpmProblem prob) ps->numProblems++; } -/* XXX TODO: implement with iterators */ -int rpmpsTrim(rpmps ps, rpmps filter) -{ - rpmProblem *t; - rpmProblem *f; - int gotProblems = 0; - - if (ps == NULL || ps->numProblems == 0) - return 0; - - if (filter == NULL) - return (ps->numProblems == 0 ? 0 : 1); - - t = ps->probs; - f = filter->probs; - - while ((f - filter->probs) < filter->numProblems) { - while ((t - ps->probs) < ps->numProblems) { - if (rpmProblemCompare(*f, *t) == 0) - break; - t++; - gotProblems = 1; - } - - /* XXX This can't happen, but let's be sane in case it does. */ - if ((t - ps->probs) == ps->numProblems) - break; - - t++, f++; - } - - if ((t - ps->probs) < ps->numProblems) - gotProblems = 1; - - return gotProblems; -} - /* * TODO: filter out duplicates while merging. Also horribly inefficient... */ int rpmpsMerge(rpmps dest, rpmps src) diff --git a/lib/rpmps.h b/lib/rpmps.h index b355e7861..4b1050b7d 100644 --- a/lib/rpmps.h +++ b/lib/rpmps.h @@ -103,23 +103,6 @@ void rpmpsPrint(FILE *fp, rpmps ps); void rpmpsAppendProblem(rpmps ps, rpmProblem prob); /** \ingroup rpmps - * Filter a problem set. - * - * As the problem sets are generated in an order solely dependent - * on the ordering of the packages in the transaction, and that - * ordering can't be changed, the problem sets must be parallel to - * one another. Additionally, the filter set must be a subset of the - * target set, given the operations available on transaction set. - * This is good, as it lets us perform this trim in linear time, rather - * then logarithmic or quadratic. - * - * @param ps problem set - * @param filter problem filter (or NULL) - * @return 0 no problems, 1 if problems remain - */ -int rpmpsTrim(rpmps ps, rpmps filter); - -/** \ingroup rpmps * Merge problem set into another. * @param dest destination problem set * @param src source problem set diff --git a/lib/rpmts.h b/lib/rpmts.h index fad4dfa84..8520bd020 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -188,7 +188,7 @@ int rpmtsOrder(rpmts ts); * - setup the rpm verify signature flags via rpmtsSetVSFlags(). * * @param ts transaction set - * @param okProbs previously known problems (or NULL) + * @param okProbs unused * @param ignoreSet bits to filter problem types * @return 0 on success, -1 on error, >0 with newProbs set */ diff --git a/lib/transaction.c b/lib/transaction.c index d0686f2ef..339b4cdb4 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1383,8 +1383,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) /* Run pre-transaction scripts, but only if there are no known * problems up to this point and not disabled otherwise. */ if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_TEST|RPMTRANS_FLAG_NOPRE)) - || (rpmpsNumProblems(tsprobs) && - (okProbs == NULL || rpmpsTrim(tsprobs, okProbs))))) { + || (rpmpsNumProblems(tsprobs)))) { rpmlog(RPMLOG_DEBUG, "running pre-transaction scripts\n"); runTransScripts(ts, PKG_PRETRANS); } @@ -1398,9 +1397,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) tsprobs = rpmtsProblems(ts); /* If unfiltered problems exist, free memory and return. */ - if ((rpmtsFlags(ts) & RPMTRANS_FLAG_BUILD_PROBS) || - (rpmpsNumProblems(tsprobs) && - (okProbs == NULL || rpmpsTrim(tsprobs, okProbs)))) { + if ((rpmtsFlags(ts) & RPMTRANS_FLAG_BUILD_PROBS) || (rpmpsNumProblems(tsprobs))) { tsMembers tsmem = rpmtsMembers(ts); rc = tsmem->orderCount; goto exit; |