[gnome-software/wip/gs-plugin-provenance-repos-handling] gs-plugin-provenance: Handle repositories specifically
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/gs-plugin-provenance-repos-handling] gs-plugin-provenance: Handle repositories specifically
- Date: Mon, 11 Apr 2022 10:33:22 +0000 (UTC)
commit ff4bc92c4c3824710cc6259b6bc8ddb71782f918
Author: Milan Crha <mcrha redhat com>
Date: Mon Apr 11 12:30:49 2022 +0200
gs-plugin-provenance: Handle repositories specifically
Do not check origin of the repository GsApp instances, because
the compulsory and provenance quirks should not be inherited
from the source. They should be for the repository itself.
Reported downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=2073353
plugins/core/gs-plugin-provenance.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c
index 2cb442aec..95e940bba 100644
--- a/plugins/core/gs-plugin-provenance.c
+++ b/plugins/core/gs-plugin-provenance.c
@@ -188,23 +188,23 @@ refine_app (GsPlugin *plugin,
if (gs_app_has_quirk (app, GS_APP_QUIRK_PROVENANCE))
return TRUE;
- /* simple case */
- origin = gs_app_get_origin (app);
- if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, origin,
&quirks)) {
- gs_plugin_provenance_add_quirks (app, quirks);
- 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_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards,
gs_app_get_id (app), &quirks)) {
- if (gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER)
+ if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY) {
+ if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards,
gs_app_get_id (app), &quirks) &&
+ gs_app_get_scope (app) != AS_COMPONENT_SCOPE_USER)
gs_plugin_provenance_add_quirks (app, quirks);
return TRUE;
}
+ /* simple case */
+ origin = gs_app_get_origin (app);
+ if (gs_plugin_provenance_find_repo_flags (repos, provenance_wildcards, compulsory_wildcards, origin,
&quirks)) {
+ gs_plugin_provenance_add_quirks (app, quirks);
+ 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]