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

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