Blob Blame Raw
From 43d4fb6a3ed4a282972dcd9d29e51e6273aaec00 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Fri, 7 Dec 2018 14:39:06 -0500
Subject: [PATCH] Fix oci pull progress reporting

Comparing the code in flatpak-utils.c:progress_cb,
we need to set bytes-transferred for the total amount
of data that has been transferred so far. The value
we were setting so far, fetched-delta-part-size, refers
to the size of the objects we already have locally, and
is subtracted from the total, which explains oci progress
running backwards.

Closes: #2392

Closes: #2400
Approved by: matthiasclasen
---
 common/flatpak-dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index 80b0a2d19..3cdc56e3e 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -4256,7 +4256,7 @@ oci_pull_progress_cb (guint64 total_size, guint64 pulled_size,
                              "total-delta-parts", "u", n_layers,
                              "fetched-delta-fallbacks", "u", 0,
                              "total-delta-fallbacks", "u", 0,
-                             "fetched-delta-part-size", "t", pulled_size,
+                             "bytes-transferred", "t", pulled_size,
                              "total-delta-part-size", "t", total_size,
                              "total-delta-part-usize", "t", total_size,
                              "total-delta-superblocks", "u", 0,