[gnome-software/1166-repository-dialog-design-updates: 1/4] 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: 1/4] gs-plugin-provenance: Change how provenance is set on repository apps
- Date: Wed, 21 Jul 2021 06:09:03 +0000 (UTC)
commit 32d1b8e5fc49d660514187cc045ef7237a84243a
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]