- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# lib/poptQV.c

Go to the documentation of this file.

    00001
    00006 #include "system.h"
    00007
    00008 #include <rpmio.h>
    00009 #include <rpmcli.h>
    00010 #include <rpmgi.h>              /* XXX for giFlags */
    00011
    00012 #include "debug.h"
    00013
    00014 /*@unchecked@*/
    00015 struct rpmQVKArguments_s rpmQVKArgs;
    00016
    00017 /*@unchecked@*/
    00018 int specedit = 0;
    00019
    00020 #define POPT_QUERYFORMAT        -1000
    00021 #define POPT_WHATREQUIRES       -1001
    00022 #define POPT_WHATPROVIDES       -1002
    00023 #define POPT_QUERYBYNUMBER      -1003
    00024 #define POPT_TRIGGEREDBY        -1004
    00025 #define POPT_DUMP               -1005
    00026 #define POPT_SPECFILE           -1006
    00027 #define POPT_QUERYBYPKGID       -1007
    00028 #define POPT_QUERYBYHDRID       -1008
    00029 #define POPT_QUERYBYFILEID      -1009
    00030 #define POPT_QUERYBYTID         -1010
    00031 #define POPT_HDLIST             -1011
    00032 #define POPT_FTSWALK            -1012
    00033
    00034 /* -1025 thrugh -1033 are common in rpmcli.h. */
    00035 #define POPT_TRUST              -1037
    00036 #define POPT_WHATNEEDS          -1038
    00037 #define POPT_SPECSRPM           -1039
    00038 #define POPT_QUERYBYSOURCEPKGID -1040
    00039
    00040 /* ========== Query/Verify/Signature source args */
    00041 static void rpmQVSourceArgCallback( /*@unused@*/ poptContext con,
    00042                 /*@unused@*/ enum poptCallbackReason reason,
    00043                 const struct poptOption * opt, /*@unused@*/ const char * arg,
    00044                 /*@unused@*/ const void * data)
    00045         /*@globals rpmQVKArgs @*/
    00046         /*@modifies rpmQVKArgs @*/
    00047 {
    00048     QVA_t qva = &rpmQVKArgs;
    00049
    00050     switch (opt->val) {
    00051     case 'q':   /* from --query, -q */
    00052     case 'Q':   /* from --querytags (handled by poptALL) */
    00053     case 'V':   /* from --verify, -V */
    00054     case 'A':   /* from --addsign */
    00055     case 'D':   /* from --delsign */
    00056     case 'I':   /* from --import */
    00057     case 'K':   /* from --checksig, -K */
    00058     case 'R':   /* from --resign */
    00059         if (qva->qva_mode == '\0' || strchr("qQ ", qva->qva_mode)) {
    00060             qva->qva_mode = opt->val;
    00061             qva->qva_char = ' ';
    00062         }
    00063         break;
    00064     case 'a': qva->qva_source |= RPMQV_ALL; qva->qva_sourceCount++; break;
    00065     case 'f': qva->qva_source |= RPMQV_PATH; qva->qva_sourceCount++; break;
    00066     case 'g': qva->qva_source |= RPMQV_GROUP; qva->qva_sourceCount++; break;
    00067     case 'p': qva->qva_source |= RPMQV_RPM; qva->qva_sourceCount++; break;
    00068     case POPT_WHATNEEDS: qva->qva_source |= RPMQV_WHATNEEDS;
    00069                                 qva->qva_sourceCount++; break;
    00070     case POPT_WHATPROVIDES: qva->qva_source |= RPMQV_WHATPROVIDES;
    00071                                 qva->qva_sourceCount++; break;
    00072     case POPT_WHATREQUIRES: qva->qva_source |= RPMQV_WHATREQUIRES;
    00073                                 qva->qva_sourceCount++; break;
    00074     case POPT_TRIGGEREDBY: qva->qva_source |= RPMQV_TRIGGEREDBY;
    00075                                 qva->qva_sourceCount++; break;
    00076     case POPT_QUERYBYSOURCEPKGID: qva->qva_source |= RPMQV_SOURCEPKGID;
    00077                                 qva->qva_sourceCount++; break;
    00078     case POPT_QUERYBYPKGID: qva->qva_source |= RPMQV_PKGID;
    00079                                 qva->qva_sourceCount++; break;
    00080     case POPT_QUERYBYHDRID: qva->qva_source |= RPMQV_HDRID;
    00081                                 qva->qva_sourceCount++; break;
    00082     case POPT_QUERYBYFILEID: qva->qva_source |= RPMQV_FILEID;
    00083                                 qva->qva_sourceCount++; break;
    00084     case POPT_QUERYBYTID: qva->qva_source |= RPMQV_TID;
    00085                                 qva->qva_sourceCount++; break;
    00086     case POPT_HDLIST: qva->qva_source |= RPMQV_HDLIST;
    00087                                 qva->qva_sourceCount++; break;
    00088     case POPT_FTSWALK:qva->qva_source |= RPMQV_FTSWALK;
    00089                                 qva->qva_sourceCount++; break;
    00090
    00091 /* XXX SPECFILE is not verify sources */
    00092     case POPT_SPECFILE:
    00093         qva->qva_source |= RPMQV_SPECFILE;
    00094         qva->qva_sourceCount++;
    00095         break;
    00096 /* XXX SPECSRPM is not verify sources */
    00097     case POPT_SPECSRPM:
    00098         qva->qva_source |= RPMQV_SPECSRPM;
    00099         qva->qva_sourceCount++;
    00100         break;
    00101     case POPT_QUERYBYNUMBER:
    00102         qva->qva_source |= RPMQV_DBOFFSET;
    00103         qva->qva_sourceCount++;
    00104         break;
    00105     }
    00106 }
    00107
    00111 /*@unchecked@*/
    00112 struct poptOption rpmQVSourcePoptTable[] = {
    00113 /*@-type@*/ /* FIX: cast? */
    00114  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA,
    00115         rpmQVSourceArgCallback, 0, NULL, NULL },
    00116 /*@=type@*/
    00117  { "all", 'a', 0, NULL, 'a',
    00118         N_("query/verify all packages"), NULL },
    00119  { "checksig", 'K', POPT_ARGFLAG_DOC_HIDDEN, NULL, 'K',
    00120         N_("rpm checksig mode"), NULL },
    00121  { "file", 'f', 0, NULL, 'f',
    00122         N_("query/verify package(s) owning file"), "FILE" },
    00123  { "group", 'g', 0, NULL, 'g',
    00124         N_("query/verify package(s) in group"), "GROUP" },
    00125  { "package", 'p', 0, NULL, 'p',
    00126         N_("query/verify a package file"), NULL },
    00127
    00128  { "ftswalk", 'W', 0, NULL, POPT_FTSWALK,
    00129         N_("query/verify package(s) from TOP file tree walk"), "TOP" },
    00130  { "hdlist", 'H', POPT_ARGFLAG_DOC_HIDDEN, 0, POPT_HDLIST,
    00131         N_("query/verify package(s) from system HDLIST"), "HDLIST" },
    00132
    00133  { "sourcepkgid", '\0', 0, NULL, POPT_QUERYBYSOURCEPKGID,
    00134         N_("query/verify package(s) with source package identifier"), "MD5" },
    00135  { "pkgid", '\0', 0, NULL, POPT_QUERYBYPKGID,
    00136         N_("query/verify package(s) with package identifier"), "MD5" },
    00137  { "hdrid", '\0', 0, NULL, POPT_QUERYBYHDRID,
    00138         N_("query/verify package(s) with header identifier"), "SHA1" },
    00139  { "fileid", '\0', 0, NULL, POPT_QUERYBYFILEID,
    00140         N_("query/verify package(s) with file identifier"), "MD5" },
    00141
    00142  { "query", 'q', POPT_ARGFLAG_DOC_HIDDEN, NULL, 'q',
    00143         N_("rpm query mode"), NULL },
    00144  { "querybynumber", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, POPT_QUERYBYNUMBER,
    00145         N_("query/verify a header instance"), "HDRNUM" },
    00146  { "specfile", '\0', 0, NULL, POPT_SPECFILE,
    00147         N_("query a spec file"), N_("<spec>") },
    00148  { "specsrpm", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, POPT_SPECSRPM,
    00149         N_("query source metadata from spec file parse"), N_("<spec>") },
    00150  { "tid", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, POPT_QUERYBYTID,
    00151         N_("query/verify package(s) from install transaction"), "TID" },
    00152  { "triggeredby", '\0', 0, NULL, POPT_TRIGGEREDBY,
    00153         N_("query the package(s) triggered by the package"), "PACKAGE" },
    00154  { "verify", 'V', POPT_ARGFLAG_DOC_HIDDEN, NULL, 'V',
    00155         N_("rpm verify mode"), NULL },
    00156  { "whatrequires", '\0', 0, NULL, POPT_WHATREQUIRES,
    00157         N_("query/verify the package(s) which require a dependency"), "CAPABILITY" },
    00158  { "whatneeds", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, POPT_WHATNEEDS,
    00159         N_("query/verify the package(s) which require any contained provide"),
    00160         "CAPABILITY" },
    00161
    00162  { "whatprovides", '\0', 0, NULL, POPT_WHATPROVIDES,
    00163         N_("query/verify the package(s) which provide a dependency"), "CAPABILITY" },
    00164
    00165  { "transaction", 'T', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, (RPMGI_TSADD|RPMGI_TSORDER),
    00166         N_("create transaction set"), NULL},
    00167  { "noorder", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, RPMGI_TSORDER,
    00168         N_("do not order transaction set"), NULL},
    00169  { "noglob", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, RPMGI_NOGLOB,
    00170         N_("do not glob arguments"), NULL},
    00171  { "nomanifest", '\0', POPT_BIT_SET, &giFlags, RPMGI_NOMANIFEST,
    00172         N_("do not process non-package files as manifests"), NULL},
    00173  { "noheader", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &giFlags, RPMGI_NOHEADER,
    00174         N_("do not read headers"), NULL},
    00175
    00176
    00177    POPT_TABLEEND
    00178 };
    00179
    00180 /* ========== Query specific popt args */
    00181
    00182 static void queryArgCallback(poptContext con,
    00183                 /*@unused@*/enum poptCallbackReason reason,
    00184                 const struct poptOption * opt, const char * arg,
    00185                 /*@unused@*/ const void * data)
    00186         /*@globals rpmQVKArgs @*/
    00187         /*@modifies con, rpmQVKArgs @*/
    00188 {
    00189     QVA_t qva = &rpmQVKArgs;
    00190
    00191     switch (opt->val) {
    00192     case 'c': qva->qva_flags |= QUERY_FOR_CONFIG | QUERY_FOR_LIST; break;
    00193     case 'd': qva->qva_flags |= QUERY_FOR_DOCS | QUERY_FOR_LIST; break;
    00194     case 'l': qva->qva_flags |= QUERY_FOR_LIST; break;
    00195     case 's': qva->qva_flags |= QUERY_FOR_STATE | QUERY_FOR_LIST;
    00196         break;
    00197     case POPT_DUMP: qva->qva_flags |= QUERY_FOR_DUMPFILES | QUERY_FOR_LIST;
    00198         break;
    00199
    00200     case POPT_QUERYFORMAT:
    00201         if (arg) {
    00202             char * qf = (char *)qva->qva_queryFormat;
    00203             if (qf) {
    00204                 size_t len = strlen(qf) + strlen(arg) + 1;
    00205                 qf = xrealloc(qf, len);
    00206                 strcat(qf, arg);
    00207             } else {
    00208                 qf = xmalloc(strlen(arg) + 1);
    00209                 strcpy(qf, arg);
    00210             }
    00211             qva->qva_queryFormat = qf;
    00212         }
    00213         break;
    00214
    00215     case 'i':
    00216         if (qva->qva_mode == 'q') {
    00217             /*@-nullassign -readonlytrans@*/
    00218             const char * infoCommand[] = { "--info", NULL };
    00219             /*@=nullassign =readonlytrans@*/
    00220             (void) poptStuffArgs(con, infoCommand);
    00221         }
    00222         break;
    00223
    00224     case RPMCLI_POPT_NODIGEST:
    00225         qva->qva_flags |= VERIFY_DIGEST;
    00226         break;
    00227
    00228     case RPMCLI_POPT_NOSIGNATURE:
    00229         qva->qva_flags |= VERIFY_SIGNATURE;
    00230         break;
    00231
    00232     case RPMCLI_POPT_NOHDRCHK:
    00233         qva->qva_flags |= VERIFY_HDRCHK;
    00234         break;
    00235
    00236     case RPMCLI_POPT_NODEPS:
    00237         qva->qva_flags |= VERIFY_DEPS;
    00238         break;
    00239
    00240     case RPMCLI_POPT_NOFDIGESTS:
    00241         qva->qva_flags |= VERIFY_FDIGEST;
    00242         break;
    00243
    00244     case RPMCLI_POPT_NOCONTEXTS:
    00245         qva->qva_flags |= VERIFY_CONTEXTS;
    00246         break;
    00247
    00248     case RPMCLI_POPT_NOSCRIPTS:
    00249         qva->qva_flags |= VERIFY_SCRIPT;
    00250         break;
    00251
    00252     /* XXX perhaps POPT_ARG_INT instead of callback. */
    00253     case POPT_TRUST:
    00254     {   char * end = NULL;
    00255         long trust = (int) strtol(arg, &end, 0);
    00256         /* XXX range checks on trust. */
    00257         /* XXX if (end && *end) argerror(_("non-numeric trust metric.")); */
    00258         qva->trust = trust;
    00259     }   break;
    00260     }
    00261 }
    00262
    00266 /*@unchecked@*/
    00267 struct poptOption rpmQueryPoptTable[] = {
    00268 /*@-type@*/ /* FIX: cast? */
    00269  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
    00270         queryArgCallback, 0, NULL, NULL },
    00271 /*@=type@*/
    00272  { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQVSourcePoptTable, 0,
    00273         NULL, NULL },
    00274  { "configfiles", 'c', 0, 0, 'c',
    00275         N_("list all configuration files"), NULL },
    00276  { "docfiles", 'd', 0, 0, 'd',
    00277         N_("list all documentation files"), NULL },
    00278  { "dump", '\0', 0, 0, POPT_DUMP,
    00279         N_("dump basic file information"), NULL },
    00280  { NULL, 'i', POPT_ARGFLAG_DOC_HIDDEN, 0, 'i',
    00281         NULL, NULL },
    00282  { "list", 'l', 0, 0, 'l',
    00283         N_("list files in package"), NULL },
    00284
    00285  { "aid", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00286         &rpmQVKArgs.depFlags, RPMDEPS_FLAG_ADDINDEPS,
    00287         N_("add suggested packages to transaction"), NULL },
    00288
    00289  /* Duplicate file attr flags from packages into command line options. */
    00290  { "noconfig", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00291         &rpmQVKArgs.qva_fflags, RPMFILE_CONFIG,
    00292         N_("skip %%config files"), NULL },
    00293  { "nodoc", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00294         &rpmQVKArgs.qva_fflags, RPMFILE_DOC,
    00295         N_("skip %%doc files"), NULL },
    00296  { "noghost", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00297         &rpmQVKArgs.qva_fflags, RPMFILE_GHOST,
    00298         N_("skip %%ghost files"), NULL },
    00299 #ifdef  NOTEVER         /* XXX there's hardly a need for these */
    00300  { "nolicense", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00301         &rpmQVKArgs.qva_fflags, RPMFILE_LICENSE,
    00302         N_("skip %%license files"), NULL },
    00303  { "noreadme", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00304         &rpmQVKArgs.qva_fflags, RPMFILE_README,
    00305         N_("skip %%readme files"), NULL },
    00306 #endif
    00307
    00308  { "qf", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, 0,
    00309         POPT_QUERYFORMAT, NULL, NULL },
    00310  { "queryformat", '\0', POPT_ARG_STRING, 0, POPT_QUERYFORMAT,
    00311         N_("use the following query format"), N_("QUERYFORMAT") },
    00312  { "specedit", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &specedit, -1,
    00313         N_("substitute i18n sections into spec file"), NULL },
    00314  { "state", 's', 0, 0, 's',
    00315         N_("display the states of the listed files"), NULL },
    00316  { "target", '\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,  RPMCLI_POPT_TARGETPLATFORM,
    00317         N_("specify target platform"), N_("CPU-VENDOR-OS") },
    00318    POPT_TABLEEND
    00319 };
    00320
    00324 struct poptOption rpmVerifyPoptTable[] = {
    00325 /*@-type@*/ /* FIX: cast? */
    00326  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
    00327         queryArgCallback, 0, NULL, NULL },
    00328 /*@=type@*/
    00329  { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQVSourcePoptTable, 0,
    00330         NULL, NULL },
    00331
    00332  { "aid", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00333         &rpmQVKArgs.depFlags, RPMDEPS_FLAG_ADDINDEPS,
    00334         N_("add suggested packages to transaction"), NULL },
    00335
    00336  /* Duplicate file attr flags from packages into command line options. */
    00337  { "noconfig", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00338         &rpmQVKArgs.qva_fflags, RPMFILE_CONFIG,
    00339         N_("skip %%config files"), NULL },
    00340  { "nodoc", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00341         &rpmQVKArgs.qva_fflags, RPMFILE_DOC,
    00342         N_("skip %%doc files"), NULL },
    00343
    00344  /* Duplicate file verify flags from packages into command line options. */
    00346 #ifdef  DYING
    00347  { "nomd5", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_FDIGEST,
    00348         N_("don't verify file digests"), NULL },
    00349 #else
    00350  { "nomd5", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NOFDIGESTS,
    00351         N_("don't verify file digests"), NULL },
    00352  { "nofdigests", '\0', 0, NULL, RPMCLI_POPT_NOFDIGESTS,
    00353         N_("don't verify file digests"), NULL },
    00354 #endif
    00355  { "nosize", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00356         &rpmQVKArgs.qva_flags, VERIFY_SIZE,
    00357         N_("don't verify size of files"), NULL },
    00358  { "nolinkto", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00359         &rpmQVKArgs.qva_flags, VERIFY_LINKTO,
    00360         N_("don't verify symlink path of files"), NULL },
    00361  { "nouser", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00362         &rpmQVKArgs.qva_flags, VERIFY_USER,
    00363         N_("don't verify owner of files"), NULL },
    00364  { "nogroup", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00365         &rpmQVKArgs.qva_flags, VERIFY_GROUP,
    00366         N_("don't verify group of files"), NULL },
    00367  { "nomtime", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00368         &rpmQVKArgs.qva_flags, VERIFY_MTIME,
    00369         N_("don't verify modification time of files"), NULL },
    00370  { "nomode", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00371         &rpmQVKArgs.qva_flags, VERIFY_MODE,
    00372         N_("don't verify mode of files"), NULL },
    00373  { "nordev", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00374         &rpmQVKArgs.qva_flags, VERIFY_RDEV,
    00375         N_("don't verify mode of files"), NULL },
    00376
    00377  { "nocontexts", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NOCONTEXTS,
    00378         N_("don't verify file security contexts"), NULL },
    00379  { "nofiles", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_FILES,
    00380         N_("don't verify files in package"), NULL},
    00381 #ifdef  DYING
    00382  { "nodeps", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_DEPS,
    00383         N_("don't verify package dependencies"), NULL },
    00384 #else
    00385  { "nodeps", '\0', 0, NULL, RPMCLI_POPT_NODEPS,
    00386         N_("don't verify package dependencies"), NULL },
    00387 #endif
    00388
    00389 #ifdef  DYING
    00390  { "noscript", '\0', POPT_BIT_SET,&rpmQVKArgs.qva_flags, VERIFY_SCRIPT,
    00391         N_("don't execute verify script(s)"), NULL },
    00392  /* XXX legacy had a trailing s on --noscript */
    00393  { "noscripts", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00394         &rpmQVKArgs.qva_flags, VERIFY_SCRIPT,
    00395         N_("don't execute verify script(s)"), NULL },
    00396 #else
    00397  { "noscript", '\0', 0, NULL, RPMCLI_POPT_NOSCRIPTS,
    00398         N_("don't execute verify script(s)"), NULL },
    00399  /* XXX legacy had a trailing s on --noscript */
    00400  { "noscripts", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NOSCRIPTS,
    00401         N_("don't execute verify script(s)"), NULL },
    00402 #endif
    00403
    00404 #ifdef  DYING
    00405  { "nodigest", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_DIGEST,
    00406         N_("don't verify package digest(s)"), NULL },
    00407  { "nohdrchk", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00408         &rpmQVKArgs.qva_flags, VERIFY_HDRCHK,
    00409         N_("don't verify database header(s) when retrieved"), NULL },
    00410  { "nosignature", '\0', POPT_BIT_SET,
    00411         &rpmQVKArgs.qva_flags, VERIFY_SIGNATURE,
    00412         N_("don't verify package signature(s)"), NULL },
    00413 #else
    00414  { "nodigest", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NODIGEST,
    00415         N_("don't verify package digest(s)"), NULL },
    00416  { "nohdrchk", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NOHDRCHK,
    00417         N_("don't verify database header(s) when retrieved"), NULL },
    00418  { "nosignature", '\0', POPT_ARGFLAG_DOC_HIDDEN, 0, RPMCLI_POPT_NOSIGNATURE,
    00419         N_("don't verify package signature(s)"), NULL },
    00420 #endif
    00421
    00422     POPT_TABLEEND
    00423 };
    00424
    00428 /*@unchecked@*/
    00429 struct poptOption rpmSignPoptTable[] = {
    00430 /*@-type@*/ /* FIX: cast? */
    00431  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
    00432         rpmQVSourceArgCallback, 0, NULL, NULL },
    00433 /*@=type@*/
    00434  { "addsign", '\0', 0, NULL, 'A',
    00435         N_("sign package(s) (identical to --resign)"), NULL },
    00436  { "checksig", 'K', 0, NULL, 'K',
    00437         N_("verify package signature(s)"), NULL },
    00438  { "delsign", '\0', 0, NULL, 'D',
    00439         N_("delete package signatures"), NULL },
    00440  { "import", '\0', 0, NULL, 'I',
    00441         N_("import an armored public key"), NULL },
    00442  { "resign", '\0', 0, NULL, 'R',
    00443         N_("sign package(s) (identical to --addsign)"), NULL },
    00444  { "sign", '\0', POPT_ARGFLAG_DOC_HIDDEN, &rpmQVKArgs.sign, 0,
    00445         N_("generate signature"), NULL },
    00446  /* XXX perhaps POPT_ARG_INT instead of callback. */
    00447  { "trust", '\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,  POPT_TRUST,
    00448         N_("specify trust metric"), "TRUST" },
    00449  { "trusted", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
    00450         &rpmQVKArgs.trust, 1,
    00451         N_("set ultimate trust when importing pubkey(s)"), NULL },
    00452  { "untrusted", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
    00453         &rpmQVKArgs.trust, -1,
    00454         N_("unset ultimate trust when importing pubkey(s)"), NULL },
    00455
    00456  { "nodigest", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_DIGEST,
    00457         N_("don't verify package digest(s)"), NULL },
    00458  { "nohdrchk", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
    00459         &rpmQVKArgs.qva_flags, VERIFY_HDRCHK,
    00460         N_("don't verify database header(s) when retrieved"), NULL },
    00461  { "nosignature", '\0', POPT_BIT_SET, &rpmQVKArgs.qva_flags, VERIFY_SIGNATURE,
    00462         N_("don't verify package signature(s)"), NULL },
    00463
    00464    POPT_TABLEEND
    00465 };