[gnome-software/1166-repository-dialog-design-updates: 93/94] gs-plugin-provenance: Change how provenance is set on repository apps




commit 0e8610c80943a7b28a5c955d316e3bbd0e269499
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 | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c
index cde5932f4..81481f0d0 100644
--- a/plugins/core/gs-plugin-provenance.c
+++ b/plugins/core/gs-plugin-provenance.c
@@ -99,6 +99,13 @@ refine_app (GsPlugin             *plugin,
                return TRUE;
        }
 
+       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]