diff --git a/src/app/main.c b/src/app/main.c index 72cfc73ead..47f5c789d3 100644 --- a/src/app/main.c +++ b/src/app/main.c @@ -65,8 +65,7 @@ static RpmOstreeCommand commands[] = { rpmostree_builtin_pkg_add }, { "pkg-remove", RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT | RPM_OSTREE_BUILTIN_FLAG_HIDDEN, rpmostree_builtin_pkg_remove }, - /* Experimental */ - { "ex", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_EXPERIMENTAL, + { "ex", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_HIDDEN, rpmostree_builtin_ex }, /* Hidden */ { "start-daemon", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT | @@ -104,8 +103,7 @@ option_context_new_with_commands (void) while (command->name != NULL) { gboolean is_hidden = (command->flags & RPM_OSTREE_BUILTIN_FLAG_HIDDEN) > 0; - gboolean is_experimental = (command->flags & RPM_OSTREE_BUILTIN_FLAG_EXPERIMENTAL) > 0; - if (!(is_hidden || is_experimental)) + if (!is_hidden) g_string_append_printf (summary, "\n %s", command->name); command++; } @@ -234,18 +232,6 @@ rpmostree_subcommand_parse (int *inout_argc, const char *command_name = NULL; int in, out; - if (invocation && (invocation->command->flags & RPM_OSTREE_BUILTIN_FLAG_EXPERIMENTAL) > 0) - { - const int is_tty = isatty (1); - const char *bold_prefix = is_tty ? "\x1b[1m" : ""; - const char *bold_suffix = is_tty ? "\x1b[0m" : ""; - - g_assert (invocation); - - g_printerr ("%snotice%s: %s is an experimental command and subject to change.\n", - bold_prefix, bold_suffix, invocation->command->name); - } - for (in = 1, out = 1; in < argc; in++, out++) { /* The non-option is the command, take it out of the arguments */ diff --git a/src/app/rpmostree-builtin-ex.c b/src/app/rpmostree-builtin-ex.c index 13effc3ba3..a2ec0477a4 100644 --- a/src/app/rpmostree-builtin-ex.c +++ b/src/app/rpmostree-builtin-ex.c @@ -111,10 +111,18 @@ rpmostree_builtin_ex (int argc, char **argv, goto out; } + prgname = g_strdup_printf ("%s %s", g_get_prgname (), subcommand_name); g_set_prgname (prgname); - { RpmOstreeCommandInvocation sub_invocation = { .command = subcommand }; + { const int is_tty = isatty (1); + const char *bold_prefix = is_tty ? "\x1b[1m" : ""; + const char *bold_suffix = is_tty ? "\x1b[0m" : ""; + + g_printerr ("%snotice%s: \"%s\" is an experimental command and subject to change.\n", + bold_prefix, bold_suffix, subcommand->name); + + RpmOstreeCommandInvocation sub_invocation = { .command = subcommand }; exit_status = subcommand->fn (argc, argv, &sub_invocation, cancellable, error); } diff --git a/src/app/rpmostree-builtins.h b/src/app/rpmostree-builtins.h index aa9e9c657e..030399655a 100644 --- a/src/app/rpmostree-builtins.h +++ b/src/app/rpmostree-builtins.h @@ -33,8 +33,7 @@ typedef enum { RPM_OSTREE_BUILTIN_FLAG_NONE = 0, RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD = 1 << 0, RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT = 1 << 1, - RPM_OSTREE_BUILTIN_FLAG_EXPERIMENTAL = 1 << 2, - RPM_OSTREE_BUILTIN_FLAG_HIDDEN = 1 << 3, + RPM_OSTREE_BUILTIN_FLAG_HIDDEN = 1 << 2, } RpmOstreeBuiltinFlags; typedef struct RpmOstreeCommand RpmOstreeCommand;