Add patch to mark compulsory only repos, not apps from it
This commit is contained in:
parent
53b2166dfb
commit
5b411a73e7
42
0007-compulsory-only-for-repos.patch
Normal file
42
0007-compulsory-only-for-repos.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 895d1ca748f4f33a852853f5f07903fb549fb66f Mon Sep 17 00:00:00 2001
|
||||
From: Milan Crha <mcrha@redhat.com>
|
||||
Date: Mon, 11 Oct 2021 09:13:59 +0200
|
||||
Subject: [PATCH] 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 22f3c98e..e44a55f0 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 **
|
||||
--
|
||||
2.31.1
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
Name: gnome-software
|
||||
Version: 41.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: A software center for GNOME
|
||||
|
||||
License: GPLv2+
|
||||
@ -25,6 +25,7 @@ Patch03: 0003-refresh-on-repository-change.patch
|
||||
Patch04: 0004-filtered-system-flathub.patch
|
||||
Patch05: 0005-repos-dialog-can-show-apps.patch
|
||||
Patch06: 0006-optional-repos-cannot-be-disabled.patch
|
||||
Patch07: 0007-compulsory-only-for-repos.patch
|
||||
|
||||
BuildRequires: appstream-devel >= %{appstream_version}
|
||||
BuildRequires: gcc
|
||||
@ -208,6 +209,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
|
||||
%{_datadir}/gtk-doc/html/gnome-software
|
||||
|
||||
%changelog
|
||||
* Mon Oct 11 2021 Milan Crha <mcrha@redhat.com> - 41.0-5
|
||||
- Add patch to mark compulsory only repos, not apps from it
|
||||
|
||||
* Fri Oct 08 2021 Milan Crha <mcrha@redhat.com> - 41.0-4
|
||||
- Resolves: #2011176 (flathub repo can't be added through gnome-software)
|
||||
- Resolves: #2010660 (gs-repos-dialog: Can show also desktop applications)
|
||||
|
Loading…
Reference in New Issue
Block a user