[ostree] pull: Ensure we begin a status line
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] pull: Ensure we begin a status line
- Date: Fri, 10 Jan 2014 15:19:10 +0000 (UTC)
commit ff2c592ac9aac2da126a1c629f15bebf202924e8
Author: Colin Walters <walters verbum org>
Date: Fri Jan 10 08:15:54 2014 -0500
pull: Ensure we begin a status line
Otherwise if the operation completes before anything happens, we hit
an assertion trying to end a status line when we didn't begin one.
src/ostree/ot-admin-builtin-upgrade.c | 5 ++++-
src/ostree/ot-builtin-pull.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c
index 1249501..299c6a8 100644
--- a/src/ostree/ot-admin-builtin-upgrade.c
+++ b/src/ostree/ot-admin-builtin-upgrade.c
@@ -110,7 +110,10 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel
console = gs_console_get ();
if (console)
- progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
+ {
+ gs_console_begin_status_line (console, "", NULL, NULL);
+ progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
+ }
g_print ("Fetching remote %s ref %s\n", origin_remote, origin_ref);
diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c
index 67305fd..7aa028a 100644
--- a/src/ostree/ot-builtin-pull.c
+++ b/src/ostree/ot-builtin-pull.c
@@ -66,7 +66,10 @@ ostree_builtin_pull (int argc, char **argv, OstreeRepo *repo, GCancellable *canc
console = gs_console_get ();
if (console)
- progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
+ {
+ gs_console_begin_status_line (console, "", NULL, NULL);
+ progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
+ }
if (!ostree_repo_pull (repo, remote, refs_to_fetch ? (char**)refs_to_fetch->pdata : NULL,
pullflags, progress, cancellable, error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]