permit "rpm -q --specfile ... file.spec" queries.

CVS patchset: 2547
CVS date: 1998/11/20 00:29:46
This commit is contained in:
jbj 1998-11-20 00:29:46 +00:00
parent 8d6486d50f
commit 2b44c3a5c3
11 changed files with 162 additions and 102 deletions

View File

@ -32,6 +32,7 @@
- there must be a { between two % in a query format (unless %% is used)
2.5.5 -> 2.5.6:
- permit "rpm -q --specfile ... file.spec" queries.
- strncasecmp on spec file separators (KDE has %Description).
- remove redundant md5 computation on uninstall.
- permit --rmsource --force even if sources/patches are missing.

View File

@ -612,7 +612,7 @@ static int findPreambleTag(Spec spec, int *tag, char **macro, char *lang)
return 0;
}
int parsePreamble(Spec spec, int initialPackage, int anyarch)
int parsePreamble(Spec spec, int initialPackage)
{
int nextPart;
int tag, rc;
@ -691,8 +691,8 @@ int parsePreamble(Spec spec, int initialPackage, int anyarch)
return RPMERR_BADSPEC;
}
/* XXX Skip valid arch check if only doing -bs processing */
if (!anyarch && checkForValidArchitectures(spec)) {
/* XXX Skip valid arch check if not building binary package */
if (!spec->anyarch && checkForValidArchitectures(spec)) {
return RPMERR_BADSPEC;
}

View File

@ -51,7 +51,7 @@ static char *doPatch(Spec spec, int c, int strip, char *db,
char file[BUFSIZ];
char args[BUFSIZ];
struct Source *sp;
int compressed;
int compressed = 0;
for (sp = spec->sources; sp != NULL; sp = sp->next) {
if ((sp->flags & RPMBUILD_ISPATCH) && (sp->num == c)) {
@ -82,12 +82,10 @@ static char *doPatch(Spec spec, int c, int strip, char *db,
strcat(args, " -E");
}
if (isCompressed(file, &compressed)) {
/* XXX On non-build parse's, file cannot be stat'd or read */
if (!spec->force && (isCompressed(file, &compressed) || checkOwners(file)))
return NULL;
}
if (checkOwners(file)) {
return NULL;
}
if (compressed) {
sprintf(buf,
"echo \"Patch #%d:\"\n"
@ -115,7 +113,7 @@ static char *doUntar(Spec spec, int c, int quietly)
char file[BUFSIZ];
char *taropts;
struct Source *sp;
int compressed;
int compressed = 0;
for (sp = spec->sources; sp != NULL; sp = sp->next) {
if ((sp->flags & RPMBUILD_ISSOURCE) && (sp->num == c)) {
@ -133,12 +131,10 @@ static char *doUntar(Spec spec, int c, int quietly)
taropts = ((rpmIsVerbose() && !quietly) ? "-xvvf" : "-xf");
if (isCompressed(file, &compressed)) {
/* XXX On non-build parse's, file cannot be stat'd or read */
if (!spec->force && (isCompressed(file, &compressed) || checkOwners(file)))
return NULL;
}
if (checkOwners(file)) {
return NULL;
}
if (compressed) {
sprintf(buf,
"%s -dc %s | tar %s -\n"
@ -402,7 +398,7 @@ static int doPatchMacro(Spec spec, char *line)
return 0;
}
int parsePrep(Spec spec, int force)
int parsePrep(Spec spec)
{
int nextPart, res, rc;
StringBuf buf;
@ -449,7 +445,7 @@ int parsePrep(Spec spec, int force)
} else {
appendLineStringBuf(spec->prep, *lines);
}
if (res && !force) {
if (res && !spec->force) {
freeSplitString(saveLines);
freeStringBuf(buf);
return res;

View File

@ -301,6 +301,9 @@ int parseSpec(Spec *specp, char *specFile, char *buildRoot,
}
addMacro(&globalMacroContext, "_docdir", NULL, "%{_defaultdocdir}", RMIL_SPEC);
spec->inBuildArchitectures = inBuildArch;
spec->anyarch = anyarch;
spec->force = force;
if (passPhrase) {
spec->passPhrase = strdup(passPhrase);
}
@ -326,11 +329,11 @@ int parseSpec(Spec *specp, char *specFile, char *buildRoot,
while (parsePart != PART_NONE) {
switch (parsePart) {
case PART_PREAMBLE:
parsePart = parsePreamble(spec, initialPackage, anyarch);
parsePart = parsePreamble(spec, initialPackage);
initialPackage = 0;
break;
case PART_PREP:
parsePart = parsePrep(spec, force);
parsePart = parsePrep(spec);
break;
case PART_BUILD:
case PART_INSTALL:

View File

@ -101,8 +101,8 @@ char *cleanFileName(char *name);
int parseChangelog(Spec spec);
int parseDescription(Spec spec);
int parseFiles(Spec spec);
int parsePreamble(Spec spec, int initialPackage, int anyarch);
int parsePrep(Spec spec, int force);
int parsePreamble(Spec spec, int initialPackage);
int parsePrep(Spec spec);
int parseRequiresConflicts(Spec spec, Package pkg, char *field,
int tag, int index);
int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag);

View File

@ -67,6 +67,9 @@ struct SpecStruct {
int buildArchitectureCount;
int inBuildArchitectures;
int force;
int anyarch;
int gotBuildRoot;
char *buildRoot;
char *buildSubdir;

View File

@ -23,6 +23,7 @@ static void printFileInfo(char * name, unsigned int size, unsigned short mode,
#define POPT_QUERYBYNUMBER 1003
#define POPT_TRIGGEREDBY 1004
#define POPT_DUMP 1005
#define POPT_SPECFILE 1006
static void queryArgCallback(poptContext con, enum poptCallbackReason reason,
const struct poptOption * opt, const char * arg,
@ -34,6 +35,7 @@ struct poptOption rpmQuerySourcePoptTable[] = {
{ "file", 'f', 0, 0, 'f', "query package owning file", "FILE" },
{ "group", 'g', 0, 0, 'g', "query packages in group", "GROUP" },
{ "package", 'p', 0, 0, 'p', "query a package file", NULL },
{ "specfile", '\0', 0, 0, POPT_SPECFILE, "query a spec file", NULL },
{ "triggeredby", '\0', 0, 0, POPT_TRIGGEREDBY,
"query the pacakges triggered by the package", "PACKAGE" },
{ "whatrequires", '\0', 0, 0, POPT_WHATREQUIRES,
@ -57,7 +59,7 @@ struct poptOption rpmQueryPoptTable[] = {
{ "queryformat", '\0', POPT_ARG_STRING, 0, POPT_QUERYFORMAT,
"use the following query format", "QUERYFORMAT" },
{ "state", 's', 0, 0, 's', "display the states of the listed files", NULL },
{ "verbose", 'v', 0, 0, 'v', "display a verbose filelisting", NULL },
{ "verbose", 'v', 0, 0, 'v', "display a verbose file listing", NULL },
{ 0, 0, 0, 0, 0, NULL, NULL }
};
@ -77,6 +79,9 @@ static void queryArgCallback(poptContext con, enum poptCallbackReason reason,
case 'f': data->source |= QUERY_PATH; data->sourceCount++; break;
case 'g': data->source |= QUERY_GROUP; data->sourceCount++; break;
case 'p': data->source |= QUERY_RPM; data->sourceCount++; break;
case POPT_SPECFILE: data->source |= QUERY_SPECFILE; data->sourceCount++; break;
case POPT_WHATPROVIDES: data->source |= QUERY_WHATPROVIDES;
data->sourceCount++; break;
case POPT_WHATREQUIRES: data->source |= QUERY_WHATREQUIRES;
@ -424,10 +429,16 @@ int rpmQuery(char * prefix, enum rpmQuerySources source, int queryFlags,
struct urlContext context;
char path[PATH_MAX];
if (source != QUERY_RPM) {
switch (source) {
default:
if (rpmdbOpen(prefix, &db, O_RDONLY, 0644)) {
fprintf(stderr, _("rpmQuery: rpmdbOpen() failed\n"));
exit(1);
}
break;
case QUERY_RPM:
case QUERY_SPECFILE:
break;
}
switch (source) {
@ -482,6 +493,38 @@ int rpmQuery(char * prefix, enum rpmQuerySources source, int queryFlags,
}
} break;
case QUERY_SPECFILE:
{ Spec spec = NULL;
Package pkg;
char * buildRoot = NULL;
int inBuildArch = 0;
char * passPhrase = "";
char *cookie = NULL;
int anyarch = 1;
int force = 1;
rc = parseSpec(&spec, arg, buildRoot, inBuildArch, passPhrase, cookie,
anyarch, force);
if (rc || spec == NULL) {
fprintf(stderr, _("query of specfile %s failed, can't parse\n"), arg);
if (spec != NULL) freeSpec(spec);
retcode = 1;
break;
}
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
#if 0
char *binRpm, *errorString;
binRpm = headerSprintf(pkg->header, rpmGetVar(RPMVAR_RPMFILENAME),
rpmTagTable, rpmHeaderFormats, &errorString);
if (!(pkg == spec->packages && pkg->next == NULL))
fprintf(stdout, "====== %s\n", binRpm);
free(binRpm);
#endif
printHeader(pkg->header, queryFlags, queryFormat);
}
freeSpec(spec);
} break;
case QUERY_ALL:
offset = rpmdbFirstRecNum(db);
while (offset) {
@ -609,8 +652,13 @@ int rpmQuery(char * prefix, enum rpmQuerySources source, int queryFlags,
break;
}
if (source != QUERY_RPM) {
switch (source) {
default:
rpmdbClose(db);
break;
case QUERY_RPM:
case QUERY_SPECFILE:
break;
}
return retcode;

View File

@ -521,7 +521,7 @@ int rpmGetFilesystemUsage(char ** filelist, int_32 * fssizes, int numFiles,
enum rpmQuerySources { QUERY_PACKAGE = 0, QUERY_PATH, QUERY_ALL, QUERY_RPM,
QUERY_GROUP, QUERY_WHATPROVIDES, QUERY_WHATREQUIRES,
QUERY_DBOFFSET, QUERY_TRIGGEREDBY };
QUERY_DBOFFSET, QUERY_TRIGGEREDBY, QUERY_SPECFILE };
#define QUERY_FOR_LIST (1 << 1)
#define QUERY_FOR_STATE (1 << 2)

View File

@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1998-11-19 13:03-0500\n"
"POT-Creation-Date: 1998-11-19 19:30-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -251,7 +251,7 @@ msgstr ""
msgid "counting packages to uninstall\n"
msgstr ""
#: ../install.c:322 ../lib/query.c:601 ../verify.c:254
#: ../install.c:322 ../lib/query.c:644 ../verify.c:254
#, c-format
msgid "package %s is not installed\n"
msgstr ""
@ -1320,15 +1320,15 @@ msgstr ""
msgid "verifying record number %u\n"
msgstr ""
#: ../lib/query.c:404 ../verify.c:139
#: ../lib/query.c:409 ../verify.c:139
msgid "error: could not read database record\n"
msgstr ""
#: ../lib/query.c:490 ../verify.c:178
#: ../lib/query.c:533 ../verify.c:178
msgid "could not read database record!\n"
msgstr ""
#: ../lib/query.c:441 ../lib/query.c:450 ../verify.c:197 ../verify.c:206
#: ../lib/query.c:452 ../lib/query.c:461 ../verify.c:197 ../verify.c:206
#, c-format
msgid "open of %s failed: %s\n"
msgstr ""
@ -1338,17 +1338,17 @@ msgstr ""
msgid "%s is not an RPM\n"
msgstr ""
#: ../lib/query.c:501 ../verify.c:229
#: ../lib/query.c:544 ../verify.c:229
#, c-format
msgid "group %s does not contain any packages\n"
msgstr ""
#: ../lib/query.c:570 ../verify.c:243
#: ../lib/query.c:613 ../verify.c:243
#, c-format
msgid "file %s is not owned by any package\n"
msgstr ""
#: ../lib/query.c:604 ../verify.c:256
#: ../lib/query.c:647 ../verify.c:256
#, c-format
msgid "error looking for package %s\n"
msgstr ""
@ -1922,48 +1922,48 @@ msgstr ""
msgid "No patch number %d"
msgstr ""
#: ../build/parsePrep.c:126
#: ../build/parsePrep.c:124
#, c-format
msgid "No source number %d"
msgstr ""
#: ../build/parsePrep.c:179
#: ../build/parsePrep.c:175
msgid "Error parsing %%setup: %s"
msgstr ""
#: ../build/parsePrep.c:194
#: ../build/parsePrep.c:190
msgid "line %d: Bad arg to %%setup %c: %s"
msgstr ""
#: ../build/parsePrep.c:215
#: ../build/parsePrep.c:211
msgid "line %d: Bad %%setup option %s: %s"
msgstr ""
#: ../build/parsePrep.c:339
#: ../build/parsePrep.c:335
msgid "line %d: Need arg to %%patch -b: %s"
msgstr ""
#: ../build/parsePrep.c:347
#: ../build/parsePrep.c:343
msgid "line %d: Need arg to %%patch -z: %s"
msgstr ""
#: ../build/parsePrep.c:359
#: ../build/parsePrep.c:355
msgid "line %d: Need arg to %%patch -p: %s"
msgstr ""
#: ../build/parsePrep.c:365
#: ../build/parsePrep.c:361
msgid "line %d: Bad arg to %%patch -p: %s"
msgstr ""
#: ../build/parsePrep.c:372
#: ../build/parsePrep.c:368
msgid "Too many patches!"
msgstr ""
#: ../build/parsePrep.c:376
#: ../build/parsePrep.c:372
msgid "line %d: Bad arg to %%patch: %s"
msgstr ""
#: ../build/parsePrep.c:412
#: ../build/parsePrep.c:408
msgid "line %d: second %%prep"
msgstr ""
@ -2045,16 +2045,16 @@ msgstr ""
msgid "malformed %%include statement"
msgstr ""
#: ../build/parseSpec.c:313
#: ../build/parseSpec.c:316
#, c-format
msgid "Timecheck value must be an integer: %s"
msgstr ""
#: ../build/parseSpec.c:396
#: ../build/parseSpec.c:399
msgid "No buildable architectures"
msgstr ""
#: ../build/parseSpec.c:424
#: ../build/parseSpec.c:427
msgid "Package has no %%description: %s"
msgstr ""
@ -2339,7 +2339,7 @@ msgstr ""
msgid "warning: %s saved as %s"
msgstr ""
#: ../lib/install.c:810 ../lib/install.c:1521 ../lib/uninstall.c:594
#: ../lib/install.c:810 ../lib/install.c:1521 ../lib/uninstall.c:597
#, c-format
msgid "rename of %s to %s failed: %s"
msgstr ""
@ -2615,98 +2615,107 @@ msgid ""
"only packages with major numbers <= 3 are supported by this version of RPM"
msgstr ""
#: ../lib/query.c:108
#: ../lib/query.c:113
#, c-format
msgid "error in format: %s\n"
msgstr ""
#: ../lib/query.c:145
#: ../lib/query.c:150
msgid "(contains no files)"
msgstr ""
#: ../lib/query.c:198
#: ../lib/query.c:203
msgid "normal "
msgstr ""
#: ../lib/query.c:200
#: ../lib/query.c:205
msgid "replaced "
msgstr ""
#: ../lib/query.c:202
#: ../lib/query.c:207
msgid "net shared "
msgstr ""
#: ../lib/query.c:204
#: ../lib/query.c:209
msgid "not installed "
msgstr ""
#: ../lib/query.c:206
#: ../lib/query.c:211
#, c-format
msgid "(unknown %3d) "
msgstr ""
#: ../lib/query.c:210
#: ../lib/query.c:215
msgid "(no state) "
msgstr ""
#: ../lib/query.c:226 ../lib/query.c:256
#: ../lib/query.c:231 ../lib/query.c:261
msgid "package has neither file owner or id lists"
msgstr ""
#: ../lib/query.c:399
#: ../lib/query.c:404
#, c-format
msgid "querying record number %d\n"
msgstr ""
#: ../lib/query.c:466
#: ../lib/query.c:435
msgid "rpmQuery: rpmdbOpen() failed\n"
msgstr ""
#: ../lib/query.c:477
msgid "old format source packages cannot be queried\n"
msgstr ""
#: ../lib/query.c:475
#: ../lib/query.c:486
#, c-format
msgid "%s does not appear to be a RPM package\n"
msgstr ""
#: ../lib/query.c:479
#: ../lib/query.c:490
#, c-format
msgid "query of %s failed\n"
msgstr ""
#: ../lib/query.c:511
#: ../lib/query.c:509
#, c-format
msgid "query of specfile %s failed, can't parse\n"
msgstr ""
#: ../lib/query.c:554
#, c-format
msgid "no package provides %s\n"
msgstr ""
#: ../lib/query.c:521
#: ../lib/query.c:564
#, c-format
msgid "no package triggers %s\n"
msgstr ""
#: ../lib/query.c:531
#: ../lib/query.c:574
#, c-format
msgid "no package requires %s\n"
msgstr ""
#: ../lib/query.c:549 ../lib/query.c:555
#: ../lib/query.c:592 ../lib/query.c:598
msgid "maximum path length exceeded\n"
msgstr ""
#: ../lib/query.c:567
#: ../lib/query.c:610
#, c-format
msgid "file %s: %s\n"
msgstr ""
#: ../lib/query.c:583
#: ../lib/query.c:626
#, c-format
msgid "invalid package number: %s\n"
msgstr ""
#: ../lib/query.c:586
#: ../lib/query.c:629
#, c-format
msgid "showing package: %d\n"
msgstr ""
#: ../lib/query.c:589
#: ../lib/query.c:632
#, c-format
msgid "record %d could not be read\n"
msgstr ""
@ -2867,92 +2876,92 @@ msgstr ""
msgid "read failed: %s (%d)"
msgstr ""
#: ../lib/rpmrc.c:216
#: ../lib/rpmrc.c:218
#, c-format
msgid "missing second ':' at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:219
#: ../lib/rpmrc.c:221
#, c-format
msgid "missing architecture name at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:364
#: ../lib/rpmrc.c:366
#, c-format
msgid "Incomplete data line at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:368
#: ../lib/rpmrc.c:370
#, c-format
msgid "Too many args in data line at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:375
#: ../lib/rpmrc.c:377
#, c-format
msgid "Bad arch/os number: %s (%s:%d)"
msgstr ""
#: ../lib/rpmrc.c:408
#: ../lib/rpmrc.c:410
#, c-format
msgid "Incomplete default line at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:413
#: ../lib/rpmrc.c:415
#, c-format
msgid "Too many args in default line at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:547 ../lib/rpmrc.c:563
#: ../lib/rpmrc.c:549 ../lib/rpmrc.c:565
#, c-format
msgid "Unable to open %s for reading: %s."
msgstr ""
#: ../lib/rpmrc.c:610
#: ../lib/rpmrc.c:612
#, c-format
msgid "Failed to read %s: %s."
msgstr ""
#: ../lib/rpmrc.c:641
#: ../lib/rpmrc.c:643
#, c-format
msgid "missing ':' at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:657 ../lib/rpmrc.c:752
#: ../lib/rpmrc.c:659 ../lib/rpmrc.c:754
#, c-format
msgid "missing argument for %s at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:687
#: ../lib/rpmrc.c:689
#, c-format
msgid "no macroname for setenv %s:%d"
msgstr ""
#: ../lib/rpmrc.c:718
#: ../lib/rpmrc.c:720
#, c-format
msgid "expansion failed at %s:d \"%s\""
msgstr ""
#: ../lib/rpmrc.c:724
#: ../lib/rpmrc.c:726
#, c-format
msgid "cannot open %s at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:742
#: ../lib/rpmrc.c:744
#, c-format
msgid "missing architecture for %s at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:809
#: ../lib/rpmrc.c:811
#, c-format
msgid "bad option '%s' at %s:%d"
msgstr ""
#: ../lib/rpmrc.c:1174
#: ../lib/rpmrc.c:1176
#, c-format
msgid "Unknown system: %s\n"
msgstr ""
#: ../lib/rpmrc.c:1175
#: ../lib/rpmrc.c:1177
msgid "Please contact rpm-list@redhat.com\n"
msgstr ""
@ -3088,59 +3097,59 @@ msgstr ""
msgid "removing database entry\n"
msgstr ""
#: ../lib/uninstall.c:508
#: ../lib/uninstall.c:511
msgid "execution of script failed"
msgstr ""
#: ../lib/uninstall.c:553
#: ../lib/uninstall.c:556
#, c-format
msgid "%s has already been replaced\n"
msgstr ""
#. if it's a config file, we may not want to remove it
#: ../lib/uninstall.c:560
#: ../lib/uninstall.c:563
#, c-format
msgid "finding md5sum of %s\n"
msgstr ""
#: ../lib/uninstall.c:569
#: ../lib/uninstall.c:572
msgid " failed - assuming file removed\n"
msgstr ""
#: ../lib/uninstall.c:572
#: ../lib/uninstall.c:575
msgid " file changed - will save\n"
msgstr ""
#: ../lib/uninstall.c:576
#: ../lib/uninstall.c:579
msgid " file unchanged - will remove\n"
msgstr ""
#: ../lib/uninstall.c:584
#: ../lib/uninstall.c:587
#, c-format
msgid "keeping %s\n"
msgstr ""
#: ../lib/uninstall.c:588
#: ../lib/uninstall.c:591
#, c-format
msgid "saving %s as %s.rpmsave\n"
msgstr ""
#: ../lib/uninstall.c:602
#: ../lib/uninstall.c:605
#, c-format
msgid "%s - removing\n"
msgstr ""
#: ../lib/uninstall.c:608
#: ../lib/uninstall.c:611
#, c-format
msgid "cannot remove %s - directory not empty"
msgstr ""
#: ../lib/uninstall.c:611
#: ../lib/uninstall.c:614
#, c-format
msgid "rmdir of %s failed: %s"
msgstr ""
#: ../lib/uninstall.c:621
#: ../lib/uninstall.c:624
#, c-format
msgid "removal of %s failed: %s"
msgstr ""

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1998-11-18 12:51-0500\n"
"POT-Creation-Date: 1998-11-19 18:16-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

4
rpm.c
View File

@ -88,7 +88,7 @@ static struct poptOption optionsTable[] = {
{ "buildos", '\0', POPT_ARG_STRING, &os, GETOPT_BUILDOS, NULL, NULL},
{ "buildplatform", '\0', POPT_ARG_STRING, 0, GETOPT_BUILDPLATFORM, NULL, NULL},
{ "buildroot", '\0', POPT_ARG_STRING, 0, GETOPT_BUILDROOT, NULL, NULL},
{ "checksig", 'K', 0, 0, 'K', NULL, NULL, NULL, NULL},
{ "checksig", 'K', 0, 0, 'K', NULL, NULL},
{ "clean", '\0', 0, &clean, 0, NULL, NULL},
{ "dbpath", '\0', POPT_ARG_STRING, 0, GETOPT_DBPATH, NULL, NULL},
{ "erase", 'e', 0, 0, 'e', NULL, NULL},
@ -117,7 +117,7 @@ static struct poptOption optionsTable[] = {
{ "oldpackage", '\0', 0, &oldPackage, 0, NULL, NULL},
{ "percent", '\0', 0, &showPercents, 0, NULL, NULL},
{ "pipe", '\0', POPT_ARG_STRING, &pipeOutput, 0, NULL, NULL},
{ "prefix", '\0', POPT_ARG_STRING, &prefix, 0, NULL, NULL},
{ "prefix", '\0', POPT_ARG_STRING, &prefix, 0, NULL, NULL},
{ "query", 'q', 0, NULL, 'q', NULL, NULL},
{ "querytags", '\0', 0, &queryTags, 0, NULL, NULL},
{ "quiet", '\0', 0, &quiet, 0, NULL, NULL},