|
|
0e7fe2 |
From 895d1ca748f4f33a852853f5f07903fb549fb66f Mon Sep 17 00:00:00 2001
|
|
|
0e7fe2 |
From: Milan Crha <mcrha@redhat.com>
|
|
|
0e7fe2 |
Date: Mon, 11 Oct 2021 09:13:59 +0200
|
|
|
0e7fe2 |
Subject: [PATCH] gs-plugin-provenance: Set COMPULSORY quirk only on REPOSITORY
|
|
|
0e7fe2 |
apps
|
|
|
0e7fe2 |
|
|
|
0e7fe2 |
The compulsory quirk related to repositories, which cannot be removed,
|
|
|
0e7fe2 |
not to the applications provided by those repositories, thus set that
|
|
|
0e7fe2 |
quirk only on repositories, not on the apps from it.
|
|
|
0e7fe2 |
|
|
|
0e7fe2 |
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1488
|
|
|
0e7fe2 |
---
|
|
|
0e7fe2 |
plugins/core/gs-plugin-provenance.c | 13 +++++--------
|
|
|
0e7fe2 |
1 file changed, 5 insertions(+), 8 deletions(-)
|
|
|
0e7fe2 |
|
|
|
0e7fe2 |
diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c
|
|
|
0e7fe2 |
index 22f3c98e..e44a55f0 100644
|
|
|
0e7fe2 |
--- a/plugins/core/gs-plugin-provenance.c
|
|
|
0e7fe2 |
+++ b/plugins/core/gs-plugin-provenance.c
|
|
|
0e7fe2 |
@@ -45,14 +45,11 @@ static void
|
|
|
0e7fe2 |
gs_plugin_provenance_add_quirks (GsApp *app,
|
|
|
0e7fe2 |
guint quirks)
|
|
|
0e7fe2 |
{
|
|
|
0e7fe2 |
- GsAppQuirk array[] = {
|
|
|
0e7fe2 |
- GS_APP_QUIRK_PROVENANCE,
|
|
|
0e7fe2 |
- GS_APP_QUIRK_COMPULSORY
|
|
|
0e7fe2 |
- };
|
|
|
0e7fe2 |
- for (guint ii = 0; ii < G_N_ELEMENTS (array); ii++) {
|
|
|
0e7fe2 |
- if ((quirks & array[ii]) != 0)
|
|
|
0e7fe2 |
- gs_app_add_quirk (app, array[ii]);
|
|
|
0e7fe2 |
- }
|
|
|
0e7fe2 |
+ if ((quirks & GS_APP_QUIRK_PROVENANCE) != 0)
|
|
|
0e7fe2 |
+ gs_app_add_quirk (app, GS_APP_QUIRK_PROVENANCE);
|
|
|
0e7fe2 |
+ if ((quirks & GS_APP_QUIRK_COMPULSORY) != 0 &&
|
|
|
0e7fe2 |
+ gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
|
|
|
0e7fe2 |
+ gs_app_add_quirk (app, GS_APP_QUIRK_COMPULSORY);
|
|
|
0e7fe2 |
}
|
|
|
0e7fe2 |
|
|
|
0e7fe2 |
static gchar **
|
|
|
0e7fe2 |
--
|
|
|
0e7fe2 |
2.31.1
|
|
|
0e7fe2 |
|