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()) {
const char * rpmcliRcfile
void printUsage(poptContext con, FILE *fp, int flags)
int rpmspecQuery(rpmts ts, QVA_t qva, const char *arg)
Function to query spec file(s).
rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags, const char *buildRoot)
Parse spec file into spec control structure.
rpmts rpmtsFree(rpmts ts)
Destroy transaction set, closing the database as well.
poptContext rpmcliInit(int argc, char *const argv[], struct poptOption *optionsTable)
Initialize most everything needed by an rpm CLI executable context.
int rpmcliQuery(rpmts ts, QVA_t qva, ARGV_const_t argv)
Display package information.
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Describe query/verify/signature command line operation.
struct rpmQVKArguments_s rpmQVKArgs
rpmts rpmtsCreate(void)
Create an empty transaction set.
rpmSpec rpmSpecFree(rpmSpec spec)
Destroy Spec structure.
poptContext rpmcliFini(poptContext optCon)
Destroy most everything needed by an rpm CLI executable context.
const char * rpmcliPipeOutput
void argerror(const char *desc)
int rpmReadConfigFiles(const char *file, const char *target)
Read macro configuration file(s) for a target.
static struct poptOption specOptsTable[]
const char * rpmSpecGetSection(rpmSpec spec, int section)
struct poptOption rpmcliAllPoptTable[]
Popt option table for options shared by all modes and executables.
char *const * ARGV_const_t
static struct poptOption optionsTable[]
void rpmFreeMacros(rpmMacroContext mc)
Destroy macro context.
int main(int argc, char *argv[])
void rpmFreeRpmrc(void)
Destroy rpmrc arch/os compatibility tables.
struct rpmSpec_s * rpmSpec