24 #define POPT_QUERYFORMAT -1000
25 #define POPT_WHATREQUIRES -1001
26 #define POPT_WHATPROVIDES -1002
27 #define POPT_QUERYBYNUMBER -1003
28 #define POPT_TRIGGEREDBY -1004
29 #define POPT_DUMP -1005
30 #define POPT_SPECFILE -1006
31 #define POPT_QUERYBYPKGID -1007
32 #define POPT_QUERYBYHDRID -1008
33 #define POPT_QUERYBYFILEID -1009
34 #define POPT_QUERYBYTID -1010
35 #define POPT_HDLIST -1011
36 #define POPT_FTSWALK -1012
39 #define POPT_TRUST -1037
40 #define POPT_WHATNEEDS -1038
41 #define POPT_SPECSRPM -1039
42 #define POPT_QUERYBYSOURCEPKGID -1040
43 #define POPT_WHATCONFLICTS -1041
44 #define POPT_WHATOBSOLETES -1042
45 #define POPT_NOPASSWORD -1043
49 enum poptCallbackReason reason,
50 const struct poptOption * opt,
131 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA,
134 {
"all",
'a', 0, NULL,
'a',
135 N_(
"query/verify all packages"), NULL },
136 {
"checksig",
'K', POPT_ARGFLAG_DOC_HIDDEN, NULL,
'K',
137 N_(
"rpm checksig mode"), NULL },
138 {
"file",
'f', 0, NULL,
'f',
139 N_(
"query/verify package(s) owning file"),
"FILE" },
140 {
"group",
'g', 0, NULL,
'g',
141 N_(
"query/verify package(s) in group"),
"GROUP" },
142 {
"package",
'p', 0, NULL,
'p',
143 N_(
"query/verify a package file"), NULL },
146 N_(
"query/verify package(s) from TOP file tree walk"),
"TOP" },
147 {
"hdlist",
'H', POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_HDLIST,
148 N_(
"query/verify package(s) from system HDLIST"),
"HDLIST" },
151 N_(
"query/verify package(s) with source package identifier"),
"MD5" },
153 N_(
"query/verify package(s) with package identifier"),
"MD5" },
155 N_(
"query/verify package(s) with header identifier"),
"SHA1" },
157 N_(
"query/verify package(s) with file identifier"),
"MD5" },
159 {
"query",
'q', POPT_ARGFLAG_DOC_HIDDEN, NULL,
'q',
160 N_(
"rpm query mode"), NULL },
162 N_(
"query/verify a header instance"),
"HDRNUM" },
164 N_(
"query a spec file"),
N_(
"<spec>") },
165 {
"specsrpm",
'\0', POPT_ARGFLAG_DOC_HIDDEN, NULL,
POPT_SPECSRPM,
166 N_(
"query source metadata from spec file parse"),
N_(
"<spec>") },
168 N_(
"query/verify package(s) from install transaction"),
"TID" },
170 N_(
"query the package(s) triggered by the package"),
"PACKAGE" },
171 {
"verify",
'V', POPT_ARGFLAG_DOC_HIDDEN, NULL,
'V',
172 N_(
"rpm verify mode"), NULL },
174 N_(
"query/verify the package(s) which require a dependency"),
"CAPABILITY" },
175 {
"whatneeds",
'\0', POPT_ARGFLAG_DOC_HIDDEN, NULL,
POPT_WHATNEEDS,
176 N_(
"query/verify the package(s) which require any contained provide"),
180 N_(
"query/verify the package(s) which provide a dependency"),
"CAPABILITY" },
182 N_(
"query/verify the package(s) which conflict with a dependency"),
"CAPABILITY" },
184 N_(
"query/verify the package(s) which obsolete a dependency"),
"CAPABILITY" },
187 N_(
"create transaction set"), NULL},
189 N_(
"do not order transaction set"), NULL},
191 N_(
"do not glob arguments"), NULL},
193 N_(
"do not process non-package files as manifests"), NULL},
195 N_(
"do not read headers"), NULL},
204 enum poptCallbackReason reason,
205 const struct poptOption * opt,
const char * arg,
213 if (opt->arg == NULL)
231 const char * fn = arg;
234 rc = poptReadFile(fn, &b, &nb, POPT_READFILE_TRIMNEWLINES);
237 if (b == NULL || nb == 0)
241 while (nb > 0 && b[nb] !=
'"')
251 size_t len = strlen(qf) + strlen(arg) + 1;
268 const char * infoCommand[] = {
"--info", NULL };
270 (void) poptStuffArgs(con, infoCommand);
305 long trust = (int) strtol(arg, &end, 0);
319 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
324 {
"configfiles",
'c', 0, 0,
'c',
325 N_(
"list all configuration files"), NULL },
326 {
"docfiles",
'd', 0, 0,
'd',
327 N_(
"list all documentation files"), NULL },
329 N_(
"dump basic file information"), NULL },
330 { NULL,
'i', POPT_ARGFLAG_DOC_HIDDEN, 0,
'i',
332 {
"list",
'l', 0, 0,
'l',
333 N_(
"list files in package"), NULL },
335 {
"aid",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
337 N_(
"add suggested packages to transaction"), NULL },
342 N_(
"skip %%config files"), NULL },
345 N_(
"skip %%doc files"), NULL },
348 N_(
"skip %%ghost files"), NULL },
352 N_(
"skip %%license files"), NULL },
355 N_(
"skip %%readme files"), NULL },
358 {
"qf",
'\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, 0,
361 N_(
"use the following query format"),
N_(
"QUERYFORMAT") },
362 {
"specedit",
'\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &
specedit, -1,
363 N_(
"substitute i18n sections into spec file"), NULL },
364 {
"state",
's', 0, 0,
's',
365 N_(
"display the states of the listed files"), NULL },
367 N_(
"specify target platform"),
N_(
"CPU-VENDOR-OS") },
376 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
384 N_(
"add suggested packages to transaction"), NULL },
387 {
"noconfig",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
389 N_(
"skip %%config files"), NULL },
390 {
"nodoc",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
392 N_(
"skip %%doc files"), NULL },
398 N_(
"don't verify file digests"), NULL },
401 N_(
"don't verify file digests"), NULL },
403 N_(
"don't verify file digests"), NULL },
405 {
"nosize",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
407 N_(
"don't verify size of files"), NULL },
408 {
"nolinkto",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
410 N_(
"don't verify symlink path of files"), NULL },
411 {
"nouser",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
413 N_(
"don't verify owner of files"), NULL },
414 {
"nogroup",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
416 N_(
"don't verify group of files"), NULL },
417 {
"nomtime",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
419 N_(
"don't verify modification time of files"), NULL },
420 {
"nomode",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
422 N_(
"don't verify mode of files"), NULL },
423 {
"nordev",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
425 N_(
"don't verify mode of files"), NULL },
428 N_(
"don't verify file security contexts"), NULL },
430 N_(
"don't verify files in package"), NULL},
433 N_(
"don't verify package dependencies"), NULL },
436 N_(
"don't verify package dependencies"), NULL },
441 N_(
"don't execute verify script(s)"), NULL },
443 {
"noscripts",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
445 N_(
"don't execute verify script(s)"), NULL },
448 N_(
"don't execute verify script(s)"), NULL },
451 N_(
"don't execute verify script(s)"), NULL },
456 N_(
"don't verify package digest(s)"), NULL },
457 {
"nohdrchk",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
459 N_(
"don't verify database header(s) when retrieved"), NULL },
460 {
"nosignature",
'\0', POPT_BIT_SET,
462 N_(
"don't verify package signature(s)"), NULL },
465 N_(
"don't verify package digest(s)"), NULL },
467 N_(
"don't verify database header(s) when retrieved"), NULL },
469 N_(
"don't verify package signature(s)"), NULL },
481 { NULL,
'\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
484 {
"addsign",
'\0', 0, NULL,
'A',
485 N_(
"sign package(s) (identical to --resign)"), NULL },
486 {
"checksig",
'K', 0, NULL,
'K',
487 N_(
"verify package signature(s)"), NULL },
488 {
"delsign",
'\0', 0, NULL,
'D',
489 N_(
"delete package signatures"), NULL },
490 {
"import",
'\0', 0, NULL,
'I',
491 N_(
"import an armored public key"), NULL },
492 {
"resign",
'\0', 0, NULL,
'R',
493 N_(
"sign package(s) (identical to --addsign)"), NULL },
495 N_(
"generate signature"), NULL },
497 {
"trust",
'\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_TRUST,
498 N_(
"specify trust metric"),
N_(
"TRUST") },
499 {
"trusted",
'\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
501 N_(
"set ultimate trust when importing pubkey(s)"), NULL },
502 {
"untrusted",
'\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
504 N_(
"unset ultimate trust when importing pubkey(s)"), NULL },
505 {
"nopassword",
'\0', POPT_ARG_STRING|POPT_ARGFLAG_DOC_HIDDEN, 0,
POPT_NOPASSWORD,
506 N_(
"disable password challenge"), NULL },
510 N_(
"don't verify package digest(s)"), NULL },
511 {
"nohdrchk",
'\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
513 N_(
"don't verify database header(s) when retrieved"), NULL },
515 N_(
"don't verify package signature(s)"), NULL },