diff options
-rw-r--r-- | lib/depends.c | 4 | ||||
-rw-r--r-- | lib/poptQV.c | 4 | ||||
-rw-r--r-- | lib/query.c | 10 | ||||
-rw-r--r-- | lib/rpmgi.c | 38 | ||||
-rw-r--r-- | lib/rpmgi.h | 9 |
5 files changed, 0 insertions, 65 deletions
diff --git a/lib/depends.c b/lib/depends.c index 195851220..b08371bd2 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -318,10 +318,6 @@ addheader: tsmem->numAddedPackages++; } - /* XXX rpmgi hack: Save header in transaction element if requested. */ - if (upgrade & 0x2) - (void) rpmteSetHeader(p, h); - /* If not upgrading or a source package, then we're done. */ if (!(upgrade & 0x1) || isSource) goto exit; diff --git a/lib/poptQV.c b/lib/poptQV.c index 16880db57..ed512b955 100644 --- a/lib/poptQV.c +++ b/lib/poptQV.c @@ -129,10 +129,6 @@ struct poptOption rpmQVSourcePoptTable[] = { { "whatprovides", '\0', 0, 0, POPT_WHATPROVIDES, N_("query/verify the package(s) which provide a dependency"), "CAPABILITY" }, - { "transaction", 'T', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, (RPMGI_TSADD|RPMGI_TSORDER), - N_("create transaction set"), NULL}, - { "noorder", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, RPMGI_TSORDER, - N_("do not order transaction set"), NULL}, { "noglob", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, RPMGI_NOGLOB, N_("do not glob arguments"), NULL}, { "nomanifest", '\0', POPT_BIT_SET, &giFlags, RPMGI_NOMANIFEST, diff --git a/lib/query.c b/lib/query.c index 1f52da493..1d4d69745 100644 --- a/lib/query.c +++ b/lib/query.c @@ -532,22 +532,13 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg) static int rpmcliArgIterHelper(rpmts ts, QVA_t qva, rpmTag tag, ARGV_const_t argv, rpmgiFlags gFlgs) { - rpmRC rpmrc = RPMRC_NOTFOUND; int ec = 0; qva->qva_gi = rpmgiNew(ts, tag, NULL, 0); rpmgiSetArgs(qva->qva_gi, argv, ftsOpts, gFlgs); - if (qva->qva_gi != NULL && (rpmgiGetFlags(qva->qva_gi) & RPMGI_TSADD)) /* Load the ts with headers. */ - while ((rpmrc = rpmgiNext(qva->qva_gi)) == RPMRC_OK) - {}; - if (rpmrc != RPMRC_NOTFOUND) { - qva->qva_gi = rpmgiFree(qva->qva_gi); - return 1; /* XXX should be no. of failures. */ - } /* FIX: argv can be NULL, cast to pass argv array */ ec = rpmQueryVerify(qva, ts, (tag == RPMDBI_PACKAGES)? (const char *) argv : NULL); - rpmtsEmpty(ts); qva->qva_gi = rpmgiFree(qva->qva_gi); return ec; } @@ -577,7 +568,6 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_const_t argv) (giFlags | (RPMGI_NOGLOB|RPMGI_NOHEADER))); while (rpmgiNext(qva->qva_gi) == RPMRC_OK) { ec += rpmQueryVerify(qva, ts, rpmgiHdrPath(qva->qva_gi)); - rpmtsEmpty(ts); } qva->qva_gi = rpmgiFree(qva->qva_gi); break; diff --git a/lib/rpmgi.c b/lib/rpmgi.c index 0a7ab94ed..fdcbdecc2 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -584,43 +584,10 @@ fprintf(stderr, "*** gi %p\t%p[%d]: %s\n", gi, gi->argv, gi->i, gi->argv[gi->i]) break; } - if ((gi->flags & RPMGI_TSADD) && gi->h != NULL) { - /* XXX rpmgi hack: Save header in transaction element. */ - xx = rpmtsAddInstallElement(gi->ts, gi->h, (fnpyKey)gi->hdrPath, 2, NULL); - } - return rpmrc; enditer: gi->mi = rpmdbFreeIterator(gi->mi); - if (gi->flags & RPMGI_TSORDER) { - rpmts ts = gi->ts; - rpmps ps; - - /* XXX installed database needs close here. */ - xx = rpmtsCloseDB(ts); - xx = rpmtsSetDBMode(ts, -1); /* XXX disable lazy opens */ - - xx = rpmtsCheck(ts); - - /* XXX query/verify will need the glop added to a buffer instead. */ - ps = rpmtsProblems(ts); - if (rpmpsNumProblems(ps) > 0) { - /* XXX rpminstall will need RPMLOG_ERR */ - rpmlog(RPMLOG_INFO, _("Failed dependencies:\n")); - if (rpmIsVerbose()) - rpmpsPrint(NULL, ps); - } - ps = rpmpsFree(ps); - rpmtsCleanProblems(ts); - - xx = rpmtsOrder(ts); - - gi->tag = RPMDBI_ADDED; /* XXX hackery */ - gi->flags &= ~(RPMGI_TSADD|RPMGI_TSORDER); - - } - gi->h = headerFree(gi->h); gi->hdrPath = _free(gi->hdrPath); gi->i = -1; @@ -645,11 +612,6 @@ rpmRC rpmgiSetArgs(rpmgi gi, ARGV_const_t argv, int ftsOpts, rpmgiFlags flags) return rpmgiGlobArgv(gi, argv); } -rpmgiFlags rpmgiGetFlags(rpmgi gi) -{ - return (gi != NULL ? gi->flags : RPMGI_NONE); -} - int rpmgiNumErrors(rpmgi gi) { return (gi != NULL ? gi->errors : -1); diff --git a/lib/rpmgi.h b/lib/rpmgi.h index 897b117b3..f00534256 100644 --- a/lib/rpmgi.h +++ b/lib/rpmgi.h @@ -20,8 +20,6 @@ extern int _rpmgi_debug; */ typedef enum rpmgiFlags_e { RPMGI_NONE = 0, - RPMGI_TSADD = (1 << 0), - RPMGI_TSORDER = (1 << 1), RPMGI_NOGLOB = (1 << 2), RPMGI_NOMANIFEST = (1 << 3), RPMGI_NOHEADER = (1 << 4) @@ -109,13 +107,6 @@ rpmRC rpmgiSetArgs(rpmgi gi, ARGV_const_t argv, /** \ingroup rpmgi - * Retrieve iterator flags - * @param gi generalized iterator - * @return iterator flags - */ -rpmgiFlags rpmgiGetFlags(rpmgi gi); - -/** \ingroup rpmgi * Return number of errors (file not found etc) encountered during iteration * @param gi generalized iterator * @return number of errors |