cbfa592
From 43d4fb6a3ed4a282972dcd9d29e51e6273aaec00 Mon Sep 17 00:00:00 2001
cbfa592
From: Matthias Clasen <mclasen@redhat.com>
cbfa592
Date: Fri, 7 Dec 2018 14:39:06 -0500
cbfa592
Subject: [PATCH] Fix oci pull progress reporting
cbfa592
cbfa592
Comparing the code in flatpak-utils.c:progress_cb,
cbfa592
we need to set bytes-transferred for the total amount
cbfa592
of data that has been transferred so far. The value
cbfa592
we were setting so far, fetched-delta-part-size, refers
cbfa592
to the size of the objects we already have locally, and
cbfa592
is subtracted from the total, which explains oci progress
cbfa592
running backwards.
cbfa592
cbfa592
Closes: #2392
cbfa592
cbfa592
Closes: #2400
cbfa592
Approved by: matthiasclasen
cbfa592
---
cbfa592
 common/flatpak-dir.c | 2 +-
cbfa592
 1 file changed, 1 insertion(+), 1 deletion(-)
cbfa592
cbfa592
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
cbfa592
index 80b0a2d19..3cdc56e3e 100644
cbfa592
--- a/common/flatpak-dir.c
cbfa592
+++ b/common/flatpak-dir.c
cbfa592
@@ -4256,7 +4256,7 @@ oci_pull_progress_cb (guint64 total_size, guint64 pulled_size,
cbfa592
                              "total-delta-parts", "u", n_layers,
cbfa592
                              "fetched-delta-fallbacks", "u", 0,
cbfa592
                              "total-delta-fallbacks", "u", 0,
cbfa592
-                             "fetched-delta-part-size", "t", pulled_size,
cbfa592
+                             "bytes-transferred", "t", pulled_size,
cbfa592
                              "total-delta-part-size", "t", total_size,
cbfa592
                              "total-delta-part-usize", "t", total_size,
cbfa592
                              "total-delta-superblocks", "u", 0,