From 0600287d5d9cf1fd36ab5400d92be9c90b676e82 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 15 Nov 2010 09:07:10 +0200 Subject: Rearrange new cli utilities' popt tables for nicer output - Use a separate table for the tool-specific options, include that from the "master" option table to get option group summary in --help. --- rpmkeys.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'rpmkeys.c') diff --git a/rpmkeys.c b/rpmkeys.c index 45ca47e4e..e6618990f 100644 --- a/rpmkeys.c +++ b/rpmkeys.c @@ -18,9 +18,7 @@ enum modes { static int mode = 0; -static struct poptOption optionsTable[] = { - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, - N_("Common options for all rpm modes and executables:"), NULL }, +static struct poptOption keyOptsTable[] = { { "checksig", 'K', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_CHECKSIG, N_("verify package signature(s)"), NULL }, { "import", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_IMPORTKEY, @@ -31,6 +29,14 @@ static struct poptOption optionsTable[] = { { "list-keys", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_LISTKEY, N_("list keys from RPM keyring"), NULL }, #endif + POPT_TABLEEND +}; + +static struct poptOption optionsTable[] = { + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, keyOptsTable, 0, + N_("Keyring options:"), NULL }, + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, + N_("Common options for all rpm modes and executables:"), NULL }, POPT_AUTOALIAS POPT_AUTOHELP -- cgit v1.2.3