4 #include <rpm/rpmcli.h>
5 #include <rpm/rpmbuild.h>
6 #include <rpm/rpmlog.h>
26 N_(
"parse spec file(s) to stdout"), NULL },
28 N_(
"query spec file(s)"), NULL },
30 N_(
"operate on binary rpms generated by spec (default)"), NULL },
32 N_(
"operate on source rpm generated by spec"), NULL },
33 {
"target", 0, POPT_ARG_STRING, &
target, 0,
34 N_(
"override target platform"), NULL },
35 {
"queryformat", 0, POPT_ARG_STRING, &
queryformat, 0,
36 N_(
"use the following query format"),
"QUERYFORMAT" },
37 {
"qf", 0, (POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN), &queryformat, 0,
45 N_(
"Spec options:"), NULL },
48 N_(
"Common options for all rpm modes and executables:"), NULL },
55 int main(
int argc,
char *argv[])
78 if (!poptPeekArg(optCon))
79 argerror(
_(
"no arguments given for query"));
89 if (!poptPeekArg(optCon))
90 argerror(
_(
"no arguments given for parse"));
92 while ((spath = poptGetArg(optCon)) != NULL) {
105 if (poptPeekArg(optCon) != NULL || argc <= 1 ||
rpmIsVerbose()) {