[gnome-software/1488-almost-all-installed-apps-are-now-displayed-as-system-ones-since-build-41-0-4-in-f35] gs-plugin-provenance: Set COMPULSORY quirk only on REPOSITORY apps
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1488-almost-all-installed-apps-are-now-displayed-as-system-ones-since-build-41-0-4-in-f35] gs-plugin-provenance: Set COMPULSORY quirk only on REPOSITORY apps
- Date: Mon, 11 Oct 2021 07:15:37 +0000 (UTC)
commit 895d1ca748f4f33a852853f5f07903fb549fb66f
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 11 09:13:59 2021 +0200
gs-plugin-provenance: Set COMPULSORY quirk only on REPOSITORY apps
The compulsory quirk related to repositories, which cannot be removed,
not to the applications provided by those repositories, thus set that
quirk only on repositories, not on the apps from it.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1488
plugins/core/gs-plugin-provenance.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/plugins/core/gs-plugin-provenance.c b/plugins/core/gs-plugin-provenance.c
index 22f3c98e1..e44a55f0a 100644
--- a/plugins/core/gs-plugin-provenance.c
+++ b/plugins/core/gs-plugin-provenance.c
@@ -45,14 +45,11 @@ static void
gs_plugin_provenance_add_quirks (GsApp *app,
guint quirks)
{
- GsAppQuirk array[] = {
- GS_APP_QUIRK_PROVENANCE,
- GS_APP_QUIRK_COMPULSORY
- };
- for (guint ii = 0; ii < G_N_ELEMENTS (array); ii++) {
- if ((quirks & array[ii]) != 0)
- gs_app_add_quirk (app, array[ii]);
- }
+ if ((quirks & GS_APP_QUIRK_PROVENANCE) != 0)
+ gs_app_add_quirk (app, GS_APP_QUIRK_PROVENANCE);
+ if ((quirks & GS_APP_QUIRK_COMPULSORY) != 0 &&
+ gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
+ gs_app_add_quirk (app, GS_APP_QUIRK_COMPULSORY);
}
static gchar **
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]