summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-pull.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-02-10 18:09:16 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-02-17 14:58:25 +0000
commitb5c5003ff6d199c9edd3237658765927597190bf (patch)
tree1f789d882dbcf546bc3e5cc811a7447f0cc80657 /src/ostree/ot-builtin-pull.c
parent693f7c5f609bbbddd84de054d6edd04a56b5c8d1 (diff)
downloadostree-b5c5003ff6d199c9edd3237658765927597190bf.tar.gz
pull: Fold together deltapart+fallback count for display
It's just simpler, and I'm not sure people are going to care much about the difference by default. We already folded in the fallback sizes into the download totals, so folding in the count makes things consistent; previously you could see e.g. `3/3 parts, 100MB/150MB` and be confused. Closes: #678 Approved by: giuseppe
Diffstat (limited to 'src/ostree/ot-builtin-pull.c')
-rw-r--r--src/ostree/ot-builtin-pull.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c
index 7df48002..170a3a91 100644
--- a/src/ostree/ot-builtin-pull.c
+++ b/src/ostree/ot-builtin-pull.c
@@ -80,14 +80,24 @@ dry_run_console_progress_changed (OstreeAsyncProgress *progress,
gpointer user_data)
{
guint fetched_delta_parts, total_delta_parts;
+ guint fetched_delta_part_fallbacks, total_delta_part_fallbacks;
guint64 fetched_delta_part_size, total_delta_part_size, total_delta_part_usize;
GString *buf;
g_assert (!printed_console_progress);
printed_console_progress = TRUE;
+ /* Number of parts */
fetched_delta_parts = ostree_async_progress_get_uint (progress, "fetched-delta-parts");
total_delta_parts = ostree_async_progress_get_uint (progress, "total-delta-parts");
+ fetched_delta_part_fallbacks = ostree_async_progress_get_uint (progress, "fetched-delta-fallbacks");
+ total_delta_part_fallbacks = ostree_async_progress_get_uint (progress, "total-delta-fallbacks");
+ /* Fold the count of deltaparts + fallbacks for simplicity; if changing this,
+ * please change ostree_repo_pull_default_console_progress_changed() first.
+ */
+ fetched_delta_parts += fetched_delta_part_fallbacks;
+ total_delta_parts += total_delta_part_fallbacks;
+ /* Size variables */
fetched_delta_part_size = ostree_async_progress_get_uint64 (progress, "fetched-delta-part-size");
total_delta_part_size = ostree_async_progress_get_uint64 (progress, "total-delta-part-size");
total_delta_part_usize = ostree_async_progress_get_uint64 (progress, "total-delta-part-usize");