Fix usage strings in help.
authorTomas Mlcoch <tmlcoch@redhat.com>
Mon, 3 Mar 2014 08:42:10 +0000 (09:42 +0100)
committerTomas Mlcoch <tmlcoch@redhat.com>
Mon, 3 Mar 2014 08:42:10 +0000 (09:42 +0100)
src/cmd_parser.c
src/mergerepo_c.c
src/modifyrepo_c.c

index 867fc3a..e5c0705 100644 (file)
@@ -152,9 +152,9 @@ struct CmdOptions *parse_arguments(int *argc, char ***argv, GError **err)
 
     assert(!err || *err == NULL);
 
-    context = g_option_context_new("- program that creates a repomd (xml-based"
-                                   " rpm metadata) repository from a set of"
-                                   " rpms.");
+    context = g_option_context_new("<directory_to_index>");
+    g_option_context_set_summary(context, "Program that creates a repomd "
+            "(xml-based rpm metadata) repository from a set of rpms.");
     g_option_context_add_main_entries(context, cmd_entries, NULL);
 
     group_expert = g_option_group_new("expert",
index 3139a89..59a990f 100644 (file)
@@ -378,8 +378,9 @@ parse_arguments(int *argc, char ***argv)
     GError *error = NULL;
     GOptionContext *context;
 
-    context = g_option_context_new(": take 2 or more repositories and merge "
-                                   "their metadata into a new repo");
+    context = g_option_context_new("--repo=url --repo=url");
+    g_option_context_set_summary(context, "Take 2 or more repositories and "
+                                 "merge their metadata into a new repo");
     g_option_context_add_main_entries(context, cmd_entries, NULL);
 
     gboolean ret = g_option_context_parse(context, argc, argv, &error);
@@ -1547,7 +1548,7 @@ main(int argc, char **argv)
 
     if (g_slist_length(cmd_options->repo_list) < 2) {
         free_options(cmd_options);
-        fprintf(stderr, "Usage: %s [options]\n\n"
+        fprintf(stderr, "Usage: %s [OPTION...] --repo=url --repo=url\n\n"
                         "%s: take 2 or more repositories and merge their "
                         "metadata into a new repo\n\n",
                         cr_get_filename(argv[0]), cr_get_filename(argv[0]));
index 7e8c384..467b277 100644 (file)
@@ -108,7 +108,10 @@ parse_arguments(int *argc, char ***argv, RawCmdOptions *options, GError **err)
     options->new_name = NULL;
 
     GOptionContext *context;
-    context = g_option_context_new(": Modify a repository's repomd.xml");
+    context = g_option_context_new("<input metadata> <output repodata>\n"
+            "  modifyrepo_c --remove <metadata type> <output repodata>\n"
+            "  modifyrepo_c [OPTION...] --batchfile <batch file> <output repodata>");
+    g_option_context_set_summary(context, "Modify a repository's repomd.xml");
     g_option_context_add_main_entries(context, cmd_entries, NULL);
     gboolean ret = g_option_context_parse(context, argc, argv, err);
     g_option_context_free(context);