diff options
author | jbj <devnull@localhost> | 2004-10-10 20:55:11 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2004-10-10 20:55:11 +0000 |
commit | a2fd0f887e7091e4b35450ad482a460e051bd79f (patch) | |
tree | b1a7c041d06da764261b121a4a913cec9a20f735 /lib/tgi.c | |
parent | e7f1a0e59fcfd681ed6c7685777a3c94269c26dd (diff) | |
download | librpm-tizen-a2fd0f887e7091e4b35450ad482a460e051bd79f.tar.gz librpm-tizen-a2fd0f887e7091e4b35450ad482a460e051bd79f.tar.bz2 librpm-tizen-a2fd0f887e7091e4b35450ad482a460e051bd79f.zip |
Add --qf to rpmgi.
CVS patchset: 7446
CVS date: 2004/10/10 20:55:11
Diffstat (limited to 'lib/tgi.c')
-rw-r--r-- | lib/tgi.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -14,6 +14,8 @@ static int gitag = RPMGI_FTSWALK; static int ftsOpts = 0; +static const char * queryFormat = NULL; + static struct poptOption optionsTable[] = { { "rpmgidebug", 'd', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmgi_debug, -1, N_("debug generalized iterator"), NULL}, @@ -27,6 +29,11 @@ static struct poptOption optionsTable[] = { { "ftswalk", '\0', POPT_ARG_VAL, &gitag, RPMGI_FTSWALK, N_("iterate fts(3) walk"), NULL }, + { "qf", '\0', POPT_ARG_STRING, &queryFormat, 0, + N_("use the following query format"), "QUERYFORMAT" }, + { "queryformat", '\0', POPT_ARG_STRING, &queryFormat, 0, + N_("use the following query format"), "QUERYFORMAT" }, + { "comfollow", '\0', POPT_BIT_SET, &ftsOpts, FTS_COMFOLLOW, N_("follow command line symlinks"), NULL }, { "logical", '\0', POPT_BIT_SET, &ftsOpts, FTS_LOGICAL, @@ -44,16 +51,6 @@ static struct poptOption optionsTable[] = { { "whiteout", '\0', POPT_BIT_SET, &ftsOpts, FTS_WHITEOUT, N_("return whiteout information"), NULL }, -#ifdef DYING - { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1, - N_("debug protocol data stream"), NULL}, - { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1, - N_("debug rpmio I/O"), NULL}, - { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1, - N_("debug URL cache handling"), NULL}, - { "verbose", 'v', 0, 0, 'v', NULL, NULL }, -#endif - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, N_("Common options for all rpm modes and executables:"), NULL }, @@ -84,6 +81,7 @@ main(int argc, char *const argv[]) ts = rpmtsCreate(); av = poptGetArgs(optCon); gi = rpmgiNew(ts, gitag, av, ftsOpts); + (void) rpmgiSetQueryFormat(gi, queryFormat); ac = 0; while ((arg = rpmgiNext(gi)) != NULL) { |