pmaports/temp/gnome-software/0001-gs-external-appstream-utils-use-external-appstream-s.patch

40 lines
1.7 KiB
Diff
Raw Normal View History

2022-05-10 12:54:27 +00:00
From 715db5606279efbb5b47ae734db7ffd407b25d79 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
2022-05-10 12:54:27 +00:00
Subject: [PATCH] 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
2022-05-10 12:54:27 +00:00
index 73c567443..39d71b299 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,
--
2022-05-10 12:54:27 +00:00
2.36.1