static gboolean opt_retain_pending;
static gboolean opt_retain_rollback;
static gboolean opt_not_as_default;
+static gboolean opt_no_prune;
static char **opt_kernel_argv;
static char **opt_kernel_argv_append;
static gboolean opt_kernel_proc_cmdline;
static GOptionEntry options[] = {
{ "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", "FILENAME" },
+ { "no-prune", 0, 0, G_OPTION_ARG_NONE, &opt_no_prune, "Don't prune the repo when done", NULL},
{ "retain", 0, 0, G_OPTION_ARG_NONE, &opt_retain, "Do not delete previous deployments", NULL },
{ "retain-pending", 0, 0, G_OPTION_ARG_NONE, &opt_retain_pending, "Do not delete pending deployments", NULL },
{ "retain-rollback", 0, 0, G_OPTION_ARG_NONE, &opt_retain_rollback, "Do not delete rollback deployments", NULL },
/* And finally, cleanup of any leftover data.
*/
- if (!ostree_sysroot_cleanup (self, cancellable, error))
- return FALSE;
+ if (opt_no_prune)
+ {
+ if (!ostree_sysroot_prepare_cleanup (sysroot, cancellable, error))
+ return FALSE;
+ }
+ else
+ {
+ if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
+ return FALSE;
+ }
return TRUE;
}