diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-10-12 15:07:38 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-10-12 15:07:38 +0300 |
commit | 6f8125c9fdcf852fb60e21d2cec54dedc62307c9 (patch) | |
tree | f22e66ffc4c69b9a8d061ccf74e946b7602fca49 /rpmspec.c | |
parent | 999431a4ab356c84c7488f6aff35b598b8a86586 (diff) | |
download | librpm-tizen-6f8125c9fdcf852fb60e21d2cec54dedc62307c9.tar.gz librpm-tizen-6f8125c9fdcf852fb60e21d2cec54dedc62307c9.tar.bz2 librpm-tizen-6f8125c9fdcf852fb60e21d2cec54dedc62307c9.zip |
Only queryformat is relevant for specfiles
- Instead of including the entire rpmQueryPoptTable in rpmspec and
showing several bogus options, support --qf/--queryformat "manually"
Diffstat (limited to 'rpmspec.c')
-rw-r--r-- | rpmspec.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -18,6 +18,7 @@ enum modes { static int mode = MODE_UNKNOWN; static int source = RPMQV_SPECRPMS; const char *target = NULL; +char *queryformat = NULL; /* the structure describing the options we take and the defaults */ static struct poptOption optionsTable[] = { @@ -29,10 +30,11 @@ static struct poptOption optionsTable[] = { N_("Operate on source rpm generated by spec"), NULL }, { "target", 0, POPT_ARG_STRING, &target, 0, N_("override target platform"), NULL }, + { "queryformat", 0, POPT_ARG_STRING, &queryformat, 0, + N_("use the following query format"), "QUERYFORMAT" }, + { "qf", 0, (POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN), &queryformat, 0, + NULL, NULL }, - /* XXX FIXME: only queryformat is relevant for spec queries */ - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQueryPoptTable, 0, - N_("Query options (with -q or --query):"), NULL }, { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, N_("Common options for all rpm modes and executables:"), NULL }, @@ -67,6 +69,7 @@ int main(int argc, char *argv[]) if (!poptPeekArg(optCon)) argerror(_("no arguments given for query")); + qva->qva_queryFormat = queryformat; qva->qva_source = source; qva->qva_specQuery = rpmspecQuery; ec = rpmcliQuery(ts, qva, (ARGV_const_t) poptGetArgs(optCon)); |