diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-03-19 16:55:01 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-03-19 16:55:01 +0200 |
commit | 061d045d296ce6d02f5ee9b96a090ab1414826ae (patch) | |
tree | 41eb3a7b88051341a169dd4a7bdb7fcfc207234f /lib/rpmgi.c | |
parent | 367c0d7014b769a5c12f83b525dddb0a7c76beef (diff) | |
download | rpm-061d045d296ce6d02f5ee9b96a090ab1414826ae.tar.gz |
Eliminate RPMDBI_ADDED iterator mode from rpmgi
- there already exists a specialized iterator for this purpose for
programmatic purposes and no cli-switches or the like to use this
(as it would be meaningless really in rpm-cli context) so ... rip
Diffstat (limited to 'lib/rpmgi.c')
-rw-r--r-- | lib/rpmgi.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/rpmgi.c b/lib/rpmgi.c index d7134d6c7..19c3211fb 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -38,8 +38,6 @@ struct rpmgi_s { char * hdrPath; /*!< Path to current iterator header. */ Header h; /*!< Current iterator header. */ - rpmtsi tsi; - rpmdbMatchIterator mi; ARGV_t argv; @@ -274,7 +272,6 @@ rpmgi rpmgiFree(rpmgi gi) gi->argv = argvFree(gi->argv); - gi->tsi = rpmtsiFree(gi->tsi); gi->mi = rpmdbFreeIterator(gi->mi); gi->ts = rpmtsFree(gi->ts); @@ -302,7 +299,6 @@ rpmgi rpmgiNew(rpmts ts, rpmTag tag, const void * keyp, size_t keylen) gi->hdrPath = NULL; gi->h = NULL; - gi->tsi = NULL; gi->mi = NULL; gi->argv = argvNew(); gi->argc = 0; @@ -349,29 +345,6 @@ rpmRC rpmgiNext(rpmgi gi) goto enditer; } break; - case RPMDBI_ADDED: - { rpmte p; - - if (!gi->active) { - gi->tsi = rpmtsiInit(gi->ts); - gi->active = 1; - } - if ((p = rpmtsiNext(gi->tsi, TR_ADDED)) != NULL) { - Header h = rpmteHeader(p); - if (h != NULL) - if (!(gi->flags & RPMGI_NOHEADER)) { - gi->h = headerLink(h); - sprintf(hnum, "%u", (unsigned)gi->i); - gi->hdrPath = rpmExpand("added h# ", hnum, NULL); - rpmrc = RPMRC_OK; - h = headerFree(h); - } - } - if (rpmrc != RPMRC_OK) { - gi->tsi = rpmtsiFree(gi->tsi); - goto enditer; - } - } break; case RPMDBI_ARGLIST: /* XXX gi->active initialize? */ if (_rpmgi_debug < 0) |