forked from pool/gnome-software
Accepting request 942316 from home:JonathanKang:branches:GNOME:Factory
- Add gnome-software-flatpak-refresh-no-interaction.patch: flatpak: Set no-interaction correctly when refreshing(bsc#1123722, glgo#GNOME/gnome-software!1145). OBS-URL: https://build.opensuse.org/request/show/942316 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=207
This commit is contained in:
parent
8dc72584b7
commit
bf73959320
44
gnome-software-flatpak-refresh-no-interaction.patch
Normal file
44
gnome-software-flatpak-refresh-no-interaction.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 65314257a6166fff7f8c80725a7aa3e52be29ad2 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Kang <jonathankang@gnome.org>
|
||||
Date: Fri, 24 Dec 2021 15:13:49 +0800
|
||||
Subject: [PATCH] flatpak: Set no-interaction correctly when refreshing
|
||||
|
||||
A GS_PLUGIN_FLAGS_INTERACTIVE flags will be set based on whether the
|
||||
plugin action should be interactive or not. Set no-interaction value
|
||||
of FlatpakInstallation according to that flag.
|
||||
|
||||
This fixes the issue where an polkit authentication dialog pops up
|
||||
when GNOME Software is running in the background and trying to check
|
||||
updates, if the polkit rules for
|
||||
org.freedesktop.Flatpak.appstream-update requires authorisation.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1561
|
||||
---
|
||||
plugins/flatpak/gs-plugin-flatpak.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
|
||||
index 29ba2970..4784282c 100644
|
||||
--- a/plugins/flatpak/gs-plugin-flatpak.c
|
||||
+++ b/plugins/flatpak/gs-plugin-flatpak.c
|
||||
@@ -269,7 +269,17 @@ gs_plugin_refresh (GsPlugin *plugin,
|
||||
{
|
||||
GsPluginData *priv = gs_plugin_get_data (plugin);
|
||||
for (guint i = 0; i < priv->flatpaks->len; i++) {
|
||||
+ FlatpakInstallation *installation;
|
||||
GsFlatpak *flatpak = g_ptr_array_index (priv->flatpaks, i);
|
||||
+ g_autoptr(FlatpakInstallation) installation_clone = NULL;
|
||||
+
|
||||
+ installation = gs_flatpak_get_installation (flatpak);
|
||||
+ installation_clone = g_object_ref (installation);
|
||||
+
|
||||
+ /* Let flatpak know if it is a background operation */
|
||||
+ flatpak_installation_set_no_interaction (installation_clone,
|
||||
+ !gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
+
|
||||
if (!gs_flatpak_refresh (flatpak, cache_age, cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 24 08:00:54 UTC 2021 - Jonathan Kang <songchuan.kang@suse.com>
|
||||
|
||||
- Add gnome-software-flatpak-refresh-no-interaction.patch: flatpak:
|
||||
Set no-interaction correctly when refreshing(bsc#1123722,
|
||||
glgo#GNOME/gnome-software!1145).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 3 18:12:22 UTC 2021 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
|
@ -30,6 +30,8 @@ Source0: https://download.gnome.org/sources/gnome-software/41/%{name}-%{v
|
||||
# PATCH-FIX-OPENSUSE gnome-software-launch-gpk-update-viewer-for-updates.patch bsc#1077332 boo#1090042 sckang@suse.com -- Don't launch gnome-software when clicking the updates notification. Launch gpk-update-viewer instead.
|
||||
Patch0: gnome-software-launch-gpk-update-viewer-for-updates.patch
|
||||
%endif
|
||||
# PATCH-FIX-UPSTREAM gnome-software-flatpak-refresh-no-interaction.patch bsc#1123722 glgo#GNOME/gnome-software!1145 sckang@suse.com -- flatpak: Set no-interaction correctly when refreshing
|
||||
Patch1: gnome-software-flatpak-refresh-no-interaction.patch
|
||||
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: meson >= 0.47.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user