Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP6
flatpak.14328
0010-OCI-correctly-handle-locally-present-icons...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0010-OCI-correctly-handle-locally-present-icons.patch of Package flatpak.14328
From 843fb75ebd096436ac1b47438ed35cdcfac85fd5 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" <otaylor@fishsoup.net> Date: Wed, 7 Aug 2019 16:25:06 -0400 Subject: [PATCH] OCI: correctly handle locally present icons If the download URL for an icon was already cached locally, the HTTP code returned FLATPAK_OCI_ERROR_NOT_CHANGED - this was treated as a real error, and after downloading missing icons, all present icons were deleted! See https://bugzilla.redhat.com/show_bug.cgi?id=1683375 Closes: #3048 Approved by: alexlarsson (cherry picked from commit a794c07e1874c44466ba130717acc74a16814423) (cherry picked from commit 767a9d5a438df0260103f26b6421b915a207ad10) Closes: #3115 Approved by: alexlarsson --- common/flatpak-oci-registry.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/flatpak-oci-registry.c b/common/flatpak-oci-registry.c index 1a6edb763..e6e1d1aa1 100644 --- a/common/flatpak-oci-registry.c +++ b/common/flatpak-oci-registry.c @@ -2223,13 +2223,18 @@ add_icon_image (SoupSession *soup_session, g_autoptr(SoupURI) base_uri = soup_uri_new (index_uri); g_autoptr(SoupURI) icon_uri = soup_uri_new_with_base (base_uri, icon_data); g_autofree char *icon_uri_s = soup_uri_to_string (icon_uri, FALSE); + g_autoptr(GError) local_error = NULL; if (!flatpak_cache_http_uri (soup_session, icon_uri_s, 0 /* flags */, icons_dfd, icon_path, NULL, NULL, - cancellable, error)) - return FALSE; + cancellable, &local_error) && + !g_error_matches (local_error, FLATPAK_OCI_ERROR, FLATPAK_OCI_ERROR_NOT_CHANGED)) + { + g_propagate_error (error, g_steal_pointer (&local_error)); + return FALSE; + } g_hash_table_replace (used_icons, g_steal_pointer (&icon_path), GUINT_TO_POINTER (1));
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor