summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-07-28 00:41:15 +0000
committerjbj <devnull@localhost>2002-07-28 00:41:15 +0000
commit670ab1c845c0f5f9d252b4599186b4934d20c4b7 (patch)
treebaa680c109ac42521719268391930ee7d9252465 /tools
parentc33342be5f9bcf69e6967db5c196b6ba32326694 (diff)
downloadrpm-670ab1c845c0f5f9d252b4599186b4934d20c4b7.tar.gz
rpm-670ab1c845c0f5f9d252b4599186b4934d20c4b7.tar.bz2
rpm-670ab1c845c0f5f9d252b4599186b4934d20c4b7.zip
- popt: display sub-table options only once on --usage.
- wire --nosignatures et al as common options, rework CLI options. CVS patchset: 5575 CVS date: 2002/07/28 00:41:15
Diffstat (limited to 'tools')
-rw-r--r--tools/rpmcache.c12
-rw-r--r--tools/rpmgraph.c10
2 files changed, 14 insertions, 8 deletions
diff --git a/tools/rpmcache.c b/tools/rpmcache.c
index 637ca5591..b84a98d8f 100644
--- a/tools/rpmcache.c
+++ b/tools/rpmcache.c
@@ -513,10 +513,6 @@ static int vsflags = _RPMTS_VSF_VERIFY_LEGACY;
static struct poptOption optionsTable[] = {
{ "nolegacy", '\0', POPT_BIT_CLR, &vsflags, _RPMTS_VSF_VERIFY_LEGACY,
N_("don't verify header+payload signature"), NULL },
- { "nodigest", '\0', POPT_BIT_SET, &vsflags, _RPMTS_VSF_NODIGESTS,
- N_("don't verify package digest"), NULL },
- { "nosignature", '\0', POPT_BIT_SET, &vsflags, _RPMTS_VSF_NOSIGNATURES,
- N_("don't verify package signature"), NULL },
{ "nocache", '\0', POPT_ARG_VAL, &noCache, -1,
N_("don't update cache database, only print package paths"), NULL },
@@ -585,7 +581,15 @@ main(int argc, char *const argv[])
}
ts = rpmtsCreate();
+
+ if (rpmcliQueryFlags & VERIFY_DIGEST)
+ vsflags |= _RPMTS_VSF_NODIGESTS;
+ if (rpmcliQueryFlags & VERIFY_SIGNATURE)
+ vsflags |= _RPMTS_VSF_NOSIGNATURES;
+ if (rpmcliQueryFlags & VERIFY_HDRCHK)
+ vsflags |= _RPMTS_VSF_NOHDRCHK;
(void) rpmtsSetVerifySigFlags(ts, vsflags);
+
{ int_32 tid = (int_32) time(NULL);
(void) rpmtsSetTid(ts, tid);
}
diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c
index 529c4544a..601055a63 100644
--- a/tools/rpmgraph.c
+++ b/tools/rpmgraph.c
@@ -274,10 +274,6 @@ static struct poptOption optionsTable[] = {
N_("don't verify package dependencies"), NULL },
{ "nolegacy", '\0', POPT_BIT_CLR, &vsflags, _RPMTS_VSF_VERIFY_LEGACY,
N_("don't verify header+payload signature"), NULL },
- { "nodigest", '\0', POPT_BIT_SET, &vsflags, _RPMTS_VSF_NODIGESTS,
- N_("don't verify package digest"), NULL },
- { "nosignature", '\0', POPT_BIT_SET, &vsflags, _RPMTS_VSF_NOSIGNATURES,
- N_("don't verify package signature"), NULL },
{ "nochainsaw", '\0', POPT_ARGFLAG_DOC_HIDDEN, &noChainsaw, 0,
NULL, NULL},
@@ -304,6 +300,12 @@ main(int argc, char *const argv[])
exit(EXIT_FAILURE);
ts = rpmtsCreate();
+ if (rpmcliQueryFlags & VERIFY_DIGEST)
+ vsflags |= _RPMTS_VSF_NODIGESTS;
+ if (rpmcliQueryFlags & VERIFY_SIGNATURE)
+ vsflags |= _RPMTS_VSF_NOSIGNATURES;
+ if (rpmcliQueryFlags & VERIFY_HDRCHK)
+ vsflags |= _RPMTS_VSF_NOHDRCHK;
(void) rpmtsSetVerifySigFlags(ts, vsflags);
ec = rpmGraph(ts, ia, poptGetArgs(optCon));