pmaports/temp/gnome-software/0001-gs-external-appstream-utils-use-external-appstream-s.patch
Pablo Correa Gómez 676b6c20bf
temp/gnome-software: sync upstream and remove pmOS AppStream data (MR 2875)
AppStream data for postmarketOS has been removed until the new format
without a double "--" is deployed. Otherwise transition will be a pain
and we would have to take care of it downstream.

Relates #1384
2022-02-20 16:18:14 +01:00

39 lines
1.7 KiB
Diff

From 3a7f4e433b9909ae1a92f7bd25de37dbefc76db8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= <ablocorrea@hotmail.com>
Date: Tue, 28 Dec 2021 20:03:00 +0100
Subject: [PATCH 1/5] gs-external-appstream-utils: use
external-appstream-system-wide key
The key had been defined when it was introduced, but it was not
implemented in code. The logic that decided whether to install
the external appstream files system-wide or just to the current
user has a bug, where it read "external-appstream-urls" instead
of "external-appstream-system-wide". This is fixed in this commit.
Additionally, before the fix, the memory returned by g_settings_get_strv
was never freed, causing a memory leak. Also, as "external-appstream-urls"
must have been set for the code to reach gs_external_appstream_refresh_url,
gs_external_appstream_refresh_user was dead code. This is also fixed
in this commit
(cherry picked from commit 7e8a1978f0e297fc052456fbc5da9218a1389903)
---
lib/gs-external-appstream-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/gs-external-appstream-utils.c b/lib/gs-external-appstream-utils.c
index 73c56744..39d71b29 100644
--- a/lib/gs-external-appstream-utils.c
+++ b/lib/gs-external-appstream-utils.c
@@ -236,7 +236,7 @@ gs_external_appstream_refresh_url (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- if (g_settings_get_strv (settings, "external-appstream-urls")) {
+ if (g_settings_get_boolean (settings, "external-appstream-system-wide")) {
return gs_external_appstream_refresh_sys (plugin, url,
cache_age,
cancellable,
--
2.25.1