From 4d04b148d8b6abad6b6ebc2685e67fc9421b308f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 21 Jun 2014 17:35:03 -0400 Subject: [PATCH] [staticanalysis]: Fix in_status_line We need to end the status line *after* we've done a pull, as ostree admin upgrade does. Also add the correct in_status_line assignment. https://bugzilla.gnome.org/show_bug.cgi?id=732020 --- src/ostree/ot-admin-builtin-switch.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c index 44861e52..a6a18626 100644 --- a/src/ostree/ot-admin-builtin-switch.c +++ b/src/ostree/ot-admin-builtin-switch.c @@ -126,15 +126,10 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell if (console) { gs_console_begin_status_line (console, "", NULL, NULL); + in_status_line = TRUE; progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); } - if (in_status_line) - { - gs_console_end_status_line (console, NULL, NULL); - in_status_line = FALSE; - } - /* Always allow older...there's not going to be a chronological * relationship necessarily. */ @@ -144,6 +139,12 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell cancellable, error)) goto out; + if (in_status_line) + { + gs_console_end_status_line (console, NULL, NULL); + in_status_line = FALSE; + } + if (!ostree_sysroot_upgrader_deploy (upgrader, cancellable, error)) goto out;