admin: Ensure instutil commands and usage help don't grab lock
When I was introducing the `_UNLOCKED` flag, I only audited subcommands of `ostree admin`, but I missed that `ostree admin instutil` also used the option parsing. Those are only used by Anaconda today so we can ignore them for locking purposes. Also, the usage help generation was grabbing the lock unnecessarily.
This commit is contained in:
parent
6a6479c355
commit
bf59d0c6f5
|
|
@ -48,7 +48,7 @@ ot_admin_instutil_builtin_grub2_generate (int argc, char **argv, GCancellable *c
|
|||
context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
|
||||
|
||||
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
|
||||
&sysroot, cancellable, error))
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, GCancel
|
|||
context = g_option_context_new ("[SUBPATH PREFIX] - relabel all or part of a deployment");
|
||||
|
||||
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
|
||||
&sysroot, cancellable, error))
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, GCancellable *cancel
|
|||
context = g_option_context_new ("ARGS - set new kernel command line arguments");
|
||||
|
||||
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
|
||||
&sysroot, cancellable, error))
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ ostree_builtin_admin (int argc, char **argv, GCancellable *cancellable, GError *
|
|||
|
||||
/* This will not return for some options (e.g. --version). */
|
||||
if (ostree_admin_option_context_parse (context, NULL, &argc, &argv,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_NONE,
|
||||
OSTREE_ADMIN_BUILTIN_FLAG_NONE | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
|
||||
NULL, cancellable, error))
|
||||
{
|
||||
if (subcommand_name == NULL)
|
||||
|
|
|
|||
Loading…
Reference in New Issue