Blame SOURCES/0001-oci-Handle-cancellations-for-appstream.patch

0f6a37
From 3ad6fe680cf3804193c8a4fe4f9f6e8840ef3524 Mon Sep 17 00:00:00 2001
0f6a37
From: Matthias Clasen <mclasen@redhat.com>
0f6a37
Date: Wed, 17 Apr 2019 11:40:26 -0400
0f6a37
Subject: [PATCH 1/3] oci: Handle cancellations for appstream
0f6a37
0f6a37
When an appstream update is cancelled while downloading
0f6a37
icons, properly fail. Otherwise, the next update attempt
0f6a37
will see an up-to-date timestamp, think everyhing is ok
0f6a37
and not download the missing icons.
0f6a37
0f6a37
Closes: https://github.com/flatpak/flatpak/issues/2835
0f6a37
0f6a37
Closes: #2836
0f6a37
Approved by: alexlarsson
0f6a37
0f6a37
(cherry picked from commit f28e62add1eb508bbfe97aab94743b129d1422ee)
0f6a37
---
0f6a37
 common/flatpak-oci-registry.c | 3 +++
0f6a37
 1 file changed, 3 insertions(+)
0f6a37
0f6a37
diff --git a/common/flatpak-oci-registry.c b/common/flatpak-oci-registry.c
0f6a37
index fe9afbdd..1a6edb76 100644
0f6a37
--- a/common/flatpak-oci-registry.c
0f6a37
+++ b/common/flatpak-oci-registry.c
0f6a37
@@ -2473,6 +2473,9 @@ flatpak_oci_index_make_appstream (SoupSession  *soup_session,
0f6a37
         }
0f6a37
     }
0f6a37
 
0f6a37
+  if (g_cancellable_set_error_if_cancelled (cancellable, error))
0f6a37
+    return NULL;
0f6a37
+
0f6a37
   if (!flatpak_appstream_xml_root_to_data (appstream_root,
0f6a37
                                            &bytes, NULL, error))
0f6a37
     return NULL;
0f6a37
-- 
0f6a37
2.21.0
0f6a37