flatpak/3850.patch
2020-09-11 16:54:54 +02:00

33 lines
1.2 KiB
Diff

From 6cf80f4703e57a819c6adc94b5a98b7c3e4c57d2 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Fri, 11 Sep 2020 16:47:05 +0200
Subject: [PATCH] OCI: Fix progress reporting
Somewhere during the progress reporting cleanup we lost the progress
for OCI pulls, this puts it back.
---
common/flatpak-progress.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/flatpak-progress.c b/common/flatpak-progress.c
index e3b8338c5..a83bcf816 100644
--- a/common/flatpak-progress.c
+++ b/common/flatpak-progress.c
@@ -428,6 +428,7 @@ flatpak_progress_update_oci_pull (FlatpakProgress *self,
if (self == NULL)
return;
+ self->requested = n_layers; /* Need to set this to trigger start of progress reporting, see update_status_progress_and_estimating() */
self->outstanding_fetches = n_layers - pulled_layers;
self->fetched_delta_parts = pulled_layers;
self->total_delta_parts = n_layers;
@@ -438,6 +439,8 @@ flatpak_progress_update_oci_pull (FlatpakProgress *self,
self->total_delta_part_usize = total_size;
self->total_delta_superblocks = 0;
update_status_progress_and_estimating (self);
+
+ self->callback (self->status, self->progress, self->estimating, self->user_data);
}
guint32