[gnome-software/1166-repository-dialog-design-updates: 46/51] gs-plugin-provenance: Change how provenance is set on repository apps
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1166-repository-dialog-design-updates: 46/51] gs-plugin-provenance: Change how provenance is set on repository apps
- Date: Thu, 5 Aug 2021 15:49:30 +0000 (UTC)
commit ab2f5c3e27f45d1ed3ffd6146371379be3c405ab
Author: Milan Crha <mcrha redhat com>
Date: Wed Jul 14 10:06:02 2021 +0200
gs-plugin-provenance: Change how provenance is set on repository apps
The repository apps have set the ID as the origin, which is different
from the regular applications. Change it, to match the repository
against the list of the system repository names.
plugins/core/gs-plugin-provenance.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c
index cde5932f4..97ff76798 100644
--- a/plugins/core/gs-plugin-provenance.c
+++ b/plugins/core/gs-plugin-provenance.c
@@ -99,6 +99,16 @@ refine_app (GsPlugin *plugin,
return TRUE;
}
+ /* Software sources/repositories are represented as #GsApps too. Add the
+ * provenance quirk to the system-configured repositories (but not
+ * user-configured ones). */
+ if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY &&
+ gs_utils_strv_fnmatch (sources, gs_app_get_id (app))) {
+ if (gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER)
+ gs_app_add_quirk (app, GS_APP_QUIRK_PROVENANCE);
+ return TRUE;
+ }
+
/* this only works for packages */
origin = gs_app_get_source_id_default (app);
if (origin == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]