Various manpage / usage blurb improvements

Corrections, clarifications, consistency.

Not a comprehensive overhaul of the manpages; they do still need work.
These are just flaws I've noted while studying the ostree command syntax.

https://bugzilla.gnome.org/show_bug.cgi?id=740097
This commit is contained in:
Matthew Barnes 2014-11-10 21:28:43 -05:00
parent f699153f67
commit 3a9127f103
23 changed files with 69 additions and 61 deletions

View File

@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA.
<term><option>--os</option>="OSNAME"</term> <term><option>--os</option>="OSNAME"</term>
<listitem><para> <listitem><para>
If provided, specifies the operating system root. Default is the current one. Use a different operating system root than the current one.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View File

@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA.
<term><option>--os</option>="OSNAME"</term> <term><option>--os</option>="OSNAME"</term>
<listitem><para> <listitem><para>
If provided, specifies the operating system root. Default is the current one. Use a different operating system root than the current one.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -98,7 +98,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--karg</option>="KEY=VALUE"</term> <term><option>--karg</option>="NAME=VALUE"</term>
<listitem><para> <listitem><para>
Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name. Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name.
@ -106,7 +106,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--karg-append</option>="KEY=VALUE"</term> <term><option>--karg-append</option>="NAME=VALUE"</term>
<listitem><para> <listitem><para>
Append kernel argument; useful with e.g. console= that can be used multiple times. Append kernel argument; useful with e.g. console= that can be used multiple times.

View File

@ -67,21 +67,21 @@ Boston, MA 02111-1307, USA.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><command>selinux-ensure-labeled</command></term> <term><command>selinux-ensure-labeled <arg choice="opt">SUBPATH PREFIX</arg></command></term>
<listitem><para> <listitem><para>
Ensure all files and directories are labeled according to SELinux policy of the first deployment. First argument is the subpath and second argument is the prefix. Ensure all files and directories are labeled according to SELinux policy of the first deployment.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><command>set-kargs <arg choice="opt">--merge</arg> <arg choice="opt">--import-proc-cmdline</arg> <arg choice="opt">--append=ARG</arg> <arg choice="opt">--replace=ARG</arg> <arg choice="opt">MORE_APPEND_ARGS</arg></command></term> <term><command>set-kargs <arg choice="opt">--merge</arg> <arg choice="opt">--import-proc-cmdline</arg> <arg choice="opt">--append="NAME=VALUE"</arg> <arg choice="opt">--replace="NAME=VALUE"</arg> <arg choice="opt">MORE_APPEND_ARGS</arg></command></term>
<listitem><para> <listitem><para>
Replace the kernel arguments of the default deployment. The new arguments are based Replace the kernel arguments of the default deployment. The new arguments are based
on an empty list (the default), the current options (--merge), or the arguments on an empty list (the default), the current options (--merge), or the arguments
of the loaded kernel (--import-proc-cmdline), and new options either are added to the of the loaded kernel (--import-proc-cmdline), and new options either are added to the
end (--append=ARG) or replace existing arguments of the same name (--replace=ARG). end (--append="NAME=VALUE") or replace existing arguments of the same name (--replace="NAME=VALUE").
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View File

@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA.
<term><option>--os</option>="OSNAME"</term> <term><option>--os</option>="OSNAME"</term>
<listitem><para> <listitem><para>
If provided, specifies the operating system root. Default is the current one. Use a different operating system root than the current one.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View File

@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA.
<term><option>--os</option>="OSNAME"</term> <term><option>--os</option>="OSNAME"</term>
<listitem><para> <listitem><para>
If provided, specifies the operating system root. Default is the current one. Use a different operating system root than the current one.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View File

@ -49,7 +49,7 @@ Boston, MA 02111-1307, USA.
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>ostree cat <arg choice="req">COMMIT</arg> <arg choice="req">PATH</arg> <arg choice="opt">PATH</arg></command> <command>ostree cat <arg choice="req">COMMIT</arg> <arg choice="req" rep="repeat">PATH</arg></command>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>

View File

@ -49,7 +49,7 @@ Boston, MA 02111-1307, USA.
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>ostree checksum <arg choice="req">FILE</arg></command> <command>ostree checksum <arg choice="req">PATH</arg></command>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>

View File

@ -49,7 +49,7 @@ Boston, MA 02111-1307, USA.
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>ostree commit <arg choice="opt" rep="repeat">OPTIONS</arg> --branch=<arg choice="req">BRANCH</arg> </command> <command>ostree commit <arg choice="opt" rep="repeat">OPTIONS</arg> --branch=<arg choice="req">BRANCH</arg> <arg choice="opt">PATH</arg></command>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
@ -65,7 +65,7 @@ Boston, MA 02111-1307, USA.
<title>Options</title> <title>Options</title>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><option>--subject</option>, <option>-s</option>="subject"</term> <term><option>--subject</option>, <option>-s</option>="SUBJECT"</term>
<listitem><para> <listitem><para>
One line subject. One line subject.
@ -73,7 +73,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--body</option>, <option>-m</option>="body"</term> <term><option>--body</option>, <option>-m</option>="BODY"</term>
<listitem><para> <listitem><para>
Full description. Full description.
@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--branch</option>, <option>-b</option>="branch"</term> <term><option>--branch</option>, <option>-b</option>="BRANCH"</term>
<listitem><para> <listitem><para>
Branch. Branch.
@ -89,7 +89,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--tree</option>="NAME"</term> <term><option>--tree</option>="dir=PATH" or "tar=TARFILE" or "ref=COMMIT"</term>
<listitem><para> <listitem><para>
Overlay the given argument as a tree. Overlay the given argument as a tree.
@ -100,7 +100,7 @@ Boston, MA 02111-1307, USA.
<term><option>--add-metadata-string</option>="KEY=VALUE"</term> <term><option>--add-metadata-string</option>="KEY=VALUE"</term>
<listitem><para> <listitem><para>
Append given key and value (in string format) to metadata. Add a key/value pair to metadata.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -108,7 +108,7 @@ Boston, MA 02111-1307, USA.
<term><option>--add-detached-metadata-string</option>="KEY=VALUE"</term> <term><option>--add-detached-metadata-string</option>="KEY=VALUE"</term>
<listitem><para> <listitem><para>
Append given key and value (in string format) to detached metadata. Add a key/value pair to detached metadata.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -184,7 +184,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--gpg-sign</option>="key-id"</term> <term><option>--gpg-sign</option>="KEY-ID"</term>
<listitem><para> <listitem><para>
GPG Key ID with which to sign the commit (if have GPGME - GNU Privacy Guard Made Easy). GPG Key ID with which to sign the commit (if have GPGME - GNU Privacy Guard Made Easy).
@ -192,7 +192,7 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--gpg-homedir</option>="homedir"</term> <term><option>--gpg-homedir</option>="HOMEDIR"</term>
<listitem><para> <listitem><para>
GPG home directory to use when looking for keyrings (if have GPGME - GNU Privacy Guard Made Easy). GPG home directory to use when looking for keyrings (if have GPGME - GNU Privacy Guard Made Easy).

View File

@ -49,7 +49,10 @@ Boston, MA 02111-1307, USA.
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>ostree config <arg choice="req">OPERATION</arg> <arg choice="opt">KEY</arg> <arg choice="opt">VALUE</arg></command> <command>ostree config get <arg choice="req">SECTIONNAME.KEYNAME</arg></command>
</cmdsynopsis>
<cmdsynopsis>
<command>ostree config set <arg choice="req">SECTIONNAME.KEYNAME</arg> <arg choice="req">VALUE</arg></command>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
@ -57,14 +60,13 @@ Boston, MA 02111-1307, USA.
<title>Description</title> <title>Description</title>
<para> <para>
Changes the configuration settings. Possible operations inlclude either "set" or "get". If OPERATION is "set", KEY and VALUE are required. If OPERATION is "get", only KEY is necessary. KEY must be of the form "sectionname.keyname". Displays or changes a configuration setting.
</para> </para>
</refsect1> </refsect1>
<!-- Need a REAL example here - what is an example of a section name and a key name?-->
<refsect1> <refsect1>
<title>Example</title> <title>Example</title>
<para><command>$ ostree config get sectionname.keyname</command></para> <para><command>$ ostree config get core.mode</command></para>
keyvalue <para>bare</para>
</refsect1> </refsect1>
</refentry> </refentry>

View File

@ -49,7 +49,13 @@ Boston, MA 02111-1307, USA.
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>ostree remote <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">OPERATION</arg> <arg choice="req">NAME</arg> <arg choice="opt">args</arg></command> <command>ostree remote <arg choice="opt" rep="repeat">OPTIONS</arg> add <arg choice="req">NAME</arg> <arg choice="req">URL</arg> <arg choice="opt" rep="repeat">BRANCH</arg></command>
</cmdsynopsis>
<cmdsynopsis>
<command>ostree remote delete <arg choice="req">NAME</arg></command>
</cmdsynopsis>
<cmdsynopsis>
<command>ostree remote show-url <arg choice="req">NAME</arg></command>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
@ -57,7 +63,7 @@ Boston, MA 02111-1307, USA.
<title>Description</title> <title>Description</title>
<para> <para>
Changes remote respository configurations. Possible operations include either "add" or "show-url". If OPERATION is "add", a URL must be specified in [args]. The NAME refers to the name of the remote. Changes remote respository configurations. The NAME refers to the name of the remote.
</para> </para>
</refsect1> </refsect1>

View File

@ -74,10 +74,10 @@ Boston, MA 02111-1307, USA.
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>--print-variant-type</option>="FILENAME"</term> <term><option>--print-variant-type</option>="TYPE"</term>
<listitem><para> <listitem><para>
Argument should be a filename and it will be interpreted as this type. Memory map <arg choice="req">OBJECT</arg> (in this case a filename) to the GVariant type string.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -85,7 +85,7 @@ Boston, MA 02111-1307, USA.
<term><option>--print-metadata-key</option>="KEY"</term> <term><option>--print-metadata-key</option>="KEY"</term>
<listitem><para> <listitem><para>
Print string value of metadata key KEY for given commit. Print string value of metadata key.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@ -93,7 +93,7 @@ Boston, MA 02111-1307, USA.
<term><option>--print-detached-metadata-key</option>="KEY"</term> <term><option>--print-detached-metadata-key</option>="KEY"</term>
<listitem><para> <listitem><para>
Print string value of detached metadata key KEY for given commit. Print string value of detached metadata key.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View File

@ -39,12 +39,12 @@ static char *opt_osname;
static char *opt_origin_path; static char *opt_origin_path;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Specify operating system root to use", NULL }, { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" },
{ "origin-file", 0, 0, G_OPTION_ARG_FILENAME, &opt_origin_path, "Specify origin file", NULL }, { "origin-file", 0, 0, G_OPTION_ARG_FILENAME, &opt_origin_path, "Specify origin file", "FILENAME" },
{ "retain", 0, 0, G_OPTION_ARG_NONE, &opt_retain, "Do not delete previous deployment", NULL }, { "retain", 0, 0, G_OPTION_ARG_NONE, &opt_retain, "Do not delete previous deployment", NULL },
{ "karg-proc-cmdline", 0, 0, G_OPTION_ARG_NONE, &opt_kernel_proc_cmdline, "Import current /proc/cmdline", NULL }, { "karg-proc-cmdline", 0, 0, G_OPTION_ARG_NONE, &opt_kernel_proc_cmdline, "Import current /proc/cmdline", NULL },
{ "karg", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_kernel_argv, "Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name", "KEY=VALUE" }, { "karg", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_kernel_argv, "Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name", "NAME=VALUE" },
{ "karg-append", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_kernel_argv_append, "Append kernel argument; useful with e.g. console= that can be used multiple times", "KEY=VALUE" }, { "karg-append", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_kernel_argv_append, "Append kernel argument; useful with e.g. console= that can be used multiple times", "NAME=VALUE" },
{ NULL } { NULL }
}; };

View File

@ -32,7 +32,7 @@
static char *opt_osname; static char *opt_osname;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Specify operating system root to use", NULL }, { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" },
{ NULL } { NULL }
}; };

View File

@ -35,7 +35,7 @@ static gboolean opt_reboot;
static char *opt_osname; static char *opt_osname;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Specify operating system root to use", NULL }, { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" },
{ NULL } { NULL }
}; };

View File

@ -38,7 +38,7 @@ static gboolean opt_allow_downgrade;
static char *opt_osname; static char *opt_osname;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Specify operating system root to use", NULL }, { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" },
{ "reboot", 'r', 0, G_OPTION_ARG_NONE, &opt_reboot, "Reboot after a successful upgrade", NULL }, { "reboot", 'r', 0, G_OPTION_ARG_NONE, &opt_reboot, "Reboot after a successful upgrade", NULL },
{ "allow-downgrade", 0, 0, G_OPTION_ARG_NONE, &opt_allow_downgrade, "Permit deployment of chronologically older trees", NULL }, { "allow-downgrade", 0, 0, G_OPTION_ARG_NONE, &opt_allow_downgrade, "Permit deployment of chronologically older trees", NULL },
{ NULL } { NULL }

View File

@ -43,7 +43,7 @@ ot_admin_instutil_builtin_grub2_generate (int argc, char **argv, OstreeSysroot *
GOptionContext *context = NULL; GOptionContext *context = NULL;
gs_unref_object GFile *deployment_path = NULL; gs_unref_object GFile *deployment_path = NULL;
context = g_option_context_new ("BOOTVERSION - generate GRUB2 configuration from given BLS entries"); context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
g_option_context_add_main_entries (context, options, NULL); g_option_context_add_main_entries (context, options, NULL);

View File

@ -37,8 +37,8 @@ static char **opt_append;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "import-proc-cmdline", 0, 0, G_OPTION_ARG_NONE, &opt_proc_cmdline, "Import current /proc/cmdline", NULL }, { "import-proc-cmdline", 0, 0, G_OPTION_ARG_NONE, &opt_proc_cmdline, "Import current /proc/cmdline", NULL },
{ "merge", 0, 0, G_OPTION_ARG_NONE, &opt_merge, "Merge with previous command line", NULL }, { "merge", 0, 0, G_OPTION_ARG_NONE, &opt_merge, "Merge with previous command line", NULL },
{ "replace", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_replace, "Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name", "KEY=VALUE" }, { "replace", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_replace, "Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name", "NAME=VALUE" },
{ "append", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_append, "Append kernel argument; useful with e.g. console= that can be used multiple times", "KEY=VALUE" }, { "append", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_append, "Append kernel argument; useful with e.g. console= that can be used multiple times", "NAME=VALUE" },
{ NULL } { NULL }
}; };

View File

@ -65,7 +65,7 @@ ostree_builtin_cat (int argc, char **argv, OstreeRepo *repo, GCancellable *cance
gs_unref_object GFile *root = NULL; gs_unref_object GFile *root = NULL;
gs_unref_object GFile *f = NULL; gs_unref_object GFile *f = NULL;
context = g_option_context_new ("COMMIT PATH [PATH...] - Concatenate contents of files"); context = g_option_context_new ("COMMIT PATH... - Concatenate contents of files");
g_option_context_add_main_entries (context, options, NULL); g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, error)) if (!g_option_context_parse (context, &argc, &argv, error))

View File

@ -42,7 +42,7 @@ static GOptionEntry options[] = {
{ "union", 0, 0, G_OPTION_ARG_NONE, &opt_union, "Keep existing directories, overwrite existing files", NULL }, { "union", 0, 0, G_OPTION_ARG_NONE, &opt_union, "Keep existing directories, overwrite existing files", NULL },
{ "allow-noent", 0, 0, G_OPTION_ARG_NONE, &opt_allow_noent, "Do nothing if specified path does not exist", NULL }, { "allow-noent", 0, 0, G_OPTION_ARG_NONE, &opt_allow_noent, "Do nothing if specified path does not exist", NULL },
{ "from-stdin", 0, 0, G_OPTION_ARG_NONE, &opt_from_stdin, "Process many checkouts from standard input", NULL }, { "from-stdin", 0, 0, G_OPTION_ARG_NONE, &opt_from_stdin, "Process many checkouts from standard input", NULL },
{ "from-file", 0, 0, G_OPTION_ARG_STRING, &opt_from_file, "Process many checkouts from input file", NULL }, { "from-file", 0, 0, G_OPTION_ARG_STRING, &opt_from_file, "Process many checkouts from input file", "FILE" },
{ NULL } { NULL }
}; };
@ -179,7 +179,7 @@ ostree_builtin_checkout (int argc, char **argv, OstreeRepo *repo, GCancellable *
gs_free char *resolved_commit = NULL; gs_free char *resolved_commit = NULL;
gs_unref_object GFile *checkout_target = NULL; gs_unref_object GFile *checkout_target = NULL;
context = g_option_context_new ("COMMIT DESTINATION - Check out a commit into a filesystem tree"); context = g_option_context_new ("COMMIT [DESTINATION] - Check out a commit into a filesystem tree");
g_option_context_add_main_entries (context, options, NULL); g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, error)) if (!g_option_context_parse (context, &argc, &argv, error))

View File

@ -63,7 +63,7 @@ ostree_builtin_checksum (int argc, char **argv, OstreeRepo *repo, GCancellable *
gs_unref_object GFile *f = NULL; gs_unref_object GFile *f = NULL;
AsyncChecksumData data = { 0, }; AsyncChecksumData data = { 0, };
context = g_option_context_new ("FILENAME - Checksum a file or directory"); context = g_option_context_new ("PATH - Checksum a file or directory");
g_option_context_add_main_entries (context, options, NULL); g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, error)) if (!g_option_context_parse (context, &argc, &argv, error))

View File

@ -83,23 +83,23 @@ static gboolean opt__fsync(const gchar *option_name,
} }
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "subject", 's', 0, G_OPTION_ARG_STRING, &opt_subject, "One line subject", "subject" }, { "subject", 's', 0, G_OPTION_ARG_STRING, &opt_subject, "One line subject", "SUBJECT" },
{ "body", 'm', 0, G_OPTION_ARG_STRING, &opt_body, "Full description", "body" }, { "body", 'm', 0, G_OPTION_ARG_STRING, &opt_body, "Full description", "BODY" },
{ "branch", 'b', 0, G_OPTION_ARG_STRING, &opt_branch, "Branch", "branch" }, { "branch", 'b', 0, G_OPTION_ARG_STRING, &opt_branch, "Branch", "BRANCH" },
{ "tree", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_trees, "Overlay the given argument as a tree", "NAME" }, { "tree", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_trees, "Overlay the given argument as a tree", "dir=PATH or tar=TARFILE or ref=COMMIT" },
{ "add-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_metadata_strings, "Append given key and value (in string format) to metadata", "KEY=VALUE" }, { "add-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_metadata_strings, "Add a key/value pair to metadata", "KEY=VALUE" },
{ "add-detached-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_detached_metadata_strings, "Append given key and value (in string format) to detached metadata", "KEY=VALUE" }, { "add-detached-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_detached_metadata_strings, "Add a key/value pair to detached metadata", "KEY=VALUE" },
{ "owner-uid", 0, 0, G_OPTION_ARG_INT, &opt_owner_uid, "Set file ownership user id", "UID" }, { "owner-uid", 0, 0, G_OPTION_ARG_INT, &opt_owner_uid, "Set file ownership user id", "UID" },
{ "owner-gid", 0, 0, G_OPTION_ARG_INT, &opt_owner_gid, "Set file ownership group id", "GID" }, { "owner-gid", 0, 0, G_OPTION_ARG_INT, &opt_owner_gid, "Set file ownership group id", "GID" },
{ "no-xattrs", 0, 0, G_OPTION_ARG_NONE, &opt_no_xattrs, "Do not import extended attributes", NULL }, { "no-xattrs", 0, 0, G_OPTION_ARG_NONE, &opt_no_xattrs, "Do not import extended attributes", NULL },
{ "link-checkout-speedup", 0, 0, G_OPTION_ARG_NONE, &opt_link_checkout_speedup, "Optimize for commits of trees composed of hardlinks into the repository", NULL }, { "link-checkout-speedup", 0, 0, G_OPTION_ARG_NONE, &opt_link_checkout_speedup, "Optimize for commits of trees composed of hardlinks into the repository", NULL },
{ "tar-autocreate-parents", 0, 0, G_OPTION_ARG_NONE, &opt_tar_autocreate_parents, "When loading tar archives, automatically create parent directories as needed", NULL }, { "tar-autocreate-parents", 0, 0, G_OPTION_ARG_NONE, &opt_tar_autocreate_parents, "When loading tar archives, automatically create parent directories as needed", NULL },
{ "skip-if-unchanged", 0, 0, G_OPTION_ARG_NONE, &opt_skip_if_unchanged, "If the contents are unchanged from previous commit, do nothing", NULL }, { "skip-if-unchanged", 0, 0, G_OPTION_ARG_NONE, &opt_skip_if_unchanged, "If the contents are unchanged from previous commit, do nothing", NULL },
{ "statoverride", 0, 0, G_OPTION_ARG_FILENAME, &opt_statoverride_file, "File containing list of modifications to make to permissions", "path" }, { "statoverride", 0, 0, G_OPTION_ARG_FILENAME, &opt_statoverride_file, "File containing list of modifications to make to permissions", "PATH" },
{ "table-output", 0, 0, G_OPTION_ARG_NONE, &opt_table_output, "Output more information in a KEY: VALUE format", NULL }, { "table-output", 0, 0, G_OPTION_ARG_NONE, &opt_table_output, "Output more information in a KEY: VALUE format", NULL },
#ifdef HAVE_GPGME #ifdef HAVE_GPGME
{ "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_key_ids, "GPG Key ID to sign the commit with", "key-id"}, { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_key_ids, "GPG Key ID to sign the commit with", "KEY-ID"},
{ "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "homedir"}, { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"},
#endif #endif
{ "generate-sizes", 0, 0, G_OPTION_ARG_NONE, &opt_generate_sizes, "Generate size information along with commit metadata", NULL }, { "generate-sizes", 0, 0, G_OPTION_ARG_NONE, &opt_generate_sizes, "Generate size information along with commit metadata", NULL },
{ "disable-fsync", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &opt_disable_fsync, "Do not invoke fsync()", NULL }, { "disable-fsync", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &opt_disable_fsync, "Do not invoke fsync()", NULL },
@ -327,7 +327,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
OstreeRepoCommitModifier *modifier = NULL; OstreeRepoCommitModifier *modifier = NULL;
OstreeRepoTransactionStats stats; OstreeRepoTransactionStats stats;
context = g_option_context_new ("[ARG] - Commit a new revision"); context = g_option_context_new ("[PATH] - Commit a new revision");
g_option_context_add_main_entries (context, options, NULL); g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, error)) if (!g_option_context_parse (context, &argc, &argv, error))

View File

@ -247,7 +247,7 @@ ostree_builtin_ls (int argc, char **argv, OstreeRepo *repo, GCancellable *cancel
int i; int i;
gs_unref_object GFile *root = NULL; gs_unref_object GFile *root = NULL;
context = g_option_context_new ("COMMIT PATH [PATH...] - List file paths"); context = g_option_context_new ("COMMIT [PATH...] - List file paths");
g_option_context_add_main_entries (context, options, NULL); g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, error)) if (!g_option_context_parse (context, &argc, &argv, error))

View File

@ -34,10 +34,10 @@ static char* opt_print_detached_metadata_key;
static gboolean opt_raw; static gboolean opt_raw;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "print-related", 0, 0, G_OPTION_ARG_NONE, &opt_print_related, "If given, show the \"related\" commits", NULL }, { "print-related", 0, 0, G_OPTION_ARG_NONE, &opt_print_related, "Show the \"related\" commits", NULL },
{ "print-variant-type", 0, 0, G_OPTION_ARG_STRING, &opt_print_variant_type, "If given, argument should be a filename and it will be interpreted as this type", NULL }, { "print-variant-type", 0, 0, G_OPTION_ARG_STRING, &opt_print_variant_type, "Memory map OBJECT (in this case a filename) to the GVariant type string", "TYPE" },
{ "print-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_metadata_key, "Print string value of metadata key KEY for given commit", "KEY" }, { "print-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_metadata_key, "Print string value of metadata key", "KEY" },
{ "print-detached-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_detached_metadata_key, "Print string value of detached metadata key KEY for given commit", "KEY" }, { "print-detached-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_detached_metadata_key, "Print string value of detached metadata key", "KEY" },
{ "raw", 0, 0, G_OPTION_ARG_NONE, &opt_raw, "Show raw variant data" }, { "raw", 0, 0, G_OPTION_ARG_NONE, &opt_raw, "Show raw variant data" },
{ NULL } { NULL }
}; };