Update to 41.0
This commit is contained in:
parent
95dd5f06f6
commit
0537bfe484
@ -1,116 +0,0 @@
|
||||
From 50ea9e8e6c4c3c23607b1ea9cc56e5e1b15c9e42 Mon Sep 17 00:00:00 2001
|
||||
From: Milan Crha <mcrha@redhat.com>
|
||||
Date: Mon, 13 Sep 2021 15:02:37 +0200
|
||||
Subject: [PATCH] packagekit: Ensure PkClient::interactive flag being set
|
||||
|
||||
That's required to properly ask or not ask for the root credentials on operations,
|
||||
which require higher privileges. It's important to set the flag always before the call
|
||||
to the PkTask/PkClient API, because other thread could change the value while
|
||||
the corresponding lock was released by the execution thread.
|
||||
|
||||
Downstream bug report:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2003365
|
||||
---
|
||||
plugins/packagekit/gs-plugin-packagekit-refresh.c | 1 +
|
||||
plugins/packagekit/gs-plugin-packagekit.c | 10 ++++++++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c
|
||||
index 338cc387..ef06bcd2 100644
|
||||
--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
|
||||
+++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c
|
||||
@@ -94,6 +94,7 @@ _download_only (GsPlugin *plugin, GsAppList *list,
|
||||
* we end up downloading a different set of packages than what was
|
||||
* shown to the user */
|
||||
pk_client_set_cache_age (PK_CLIENT (priv->task), G_MAXUINT);
|
||||
+ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results2 = pk_task_update_packages_sync (priv->task,
|
||||
package_ids,
|
||||
cancellable,
|
||||
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
|
||||
index da083019..c9e4e49f 100644
|
||||
--- a/plugins/packagekit/gs-plugin-packagekit.c
|
||||
+++ b/plugins/packagekit/gs-plugin-packagekit.c
|
||||
@@ -424,6 +424,7 @@ gs_plugin_app_install (GsPlugin *plugin,
|
||||
/* actually install the package */
|
||||
gs_packagekit_helper_add_app (helper, app);
|
||||
g_mutex_lock (&priv->task_mutex);
|
||||
+ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_task_install_packages_sync (priv->task,
|
||||
package_ids,
|
||||
cancellable,
|
||||
@@ -501,6 +502,7 @@ gs_plugin_app_install (GsPlugin *plugin,
|
||||
}
|
||||
gs_packagekit_helper_add_app (helper, app);
|
||||
g_mutex_lock (&priv->task_mutex);
|
||||
+ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_task_install_packages_sync (priv->task,
|
||||
(gchar **) array_package_ids->pdata,
|
||||
cancellable,
|
||||
@@ -542,6 +544,7 @@ gs_plugin_app_install (GsPlugin *plugin,
|
||||
gs_app_set_state (app, GS_APP_STATE_INSTALLING);
|
||||
gs_packagekit_helper_add_app (helper, app);
|
||||
g_mutex_lock (&priv->task_mutex);
|
||||
+ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_task_install_files_sync (priv->task,
|
||||
package_ids,
|
||||
cancellable,
|
||||
@@ -627,6 +630,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
|
||||
gs_app_set_state (app, GS_APP_STATE_REMOVING);
|
||||
gs_packagekit_helper_add_app (helper, app);
|
||||
g_mutex_lock (&priv->task_mutex);
|
||||
+ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_task_remove_packages_sync (priv->task,
|
||||
package_ids,
|
||||
TRUE, GS_PACKAGEKIT_AUTOREMOVE,
|
||||
@@ -862,6 +866,7 @@ gs_plugin_packagekit_resolve_packages_with_filter (GsPlugin *plugin,
|
||||
|
||||
/* resolve them all at once */
|
||||
g_mutex_lock (&priv->client_mutex_refine);
|
||||
+ pk_client_set_interactive (priv->client_refine, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_client_resolve (priv->client_refine,
|
||||
filter,
|
||||
(gchar **) package_ids->pdata,
|
||||
@@ -953,6 +958,7 @@ gs_plugin_packagekit_refine_from_desktop (GsPlugin *plugin,
|
||||
to_array[0] = filename;
|
||||
gs_packagekit_helper_add_app (helper, app);
|
||||
g_mutex_lock (&priv->client_mutex_refine);
|
||||
+ pk_client_set_interactive (priv->client_refine, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_client_search_files (priv->client_refine,
|
||||
pk_bitfield_from_enums (PK_FILTER_ENUM_INSTALLED, -1),
|
||||
(gchar **) to_array,
|
||||
@@ -1036,6 +1042,7 @@ gs_plugin_packagekit_refine_updatedetails (GsPlugin *plugin,
|
||||
|
||||
/* get any update details */
|
||||
g_mutex_lock (&priv->client_mutex_refine);
|
||||
+ pk_client_set_interactive (priv->client_refine, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_client_get_update_detail (priv->client_refine,
|
||||
(gchar **) package_ids,
|
||||
cancellable,
|
||||
@@ -1102,6 +1109,7 @@ gs_plugin_packagekit_refine_details2 (GsPlugin *plugin,
|
||||
|
||||
/* get any details */
|
||||
g_mutex_lock (&priv->client_mutex_refine);
|
||||
+ pk_client_set_interactive (priv->client_refine, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_client_get_details (priv->client_refine,
|
||||
(gchar **) package_ids->pdata,
|
||||
cancellable,
|
||||
@@ -1154,6 +1162,7 @@ gs_plugin_packagekit_refine_update_urgency (GsPlugin *plugin,
|
||||
/* get the list of updates */
|
||||
filter = pk_bitfield_value (PK_FILTER_ENUM_NONE);
|
||||
g_mutex_lock (&priv->client_mutex_refine);
|
||||
+ pk_client_set_interactive (priv->client_refine, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_client_get_updates (priv->client_refine,
|
||||
filter,
|
||||
cancellable,
|
||||
@@ -1812,6 +1821,7 @@ gs_plugin_packagekit_refresh_guess_app_id (GsPlugin *plugin,
|
||||
files = g_strsplit (filename, "\t", -1);
|
||||
gs_packagekit_helper_add_app (helper, app);
|
||||
g_mutex_lock (&priv->task_mutex_local);
|
||||
+ pk_client_set_interactive (PK_CLIENT (priv->task_local), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE));
|
||||
results = pk_client_get_files_local (PK_CLIENT (priv->task_local),
|
||||
files,
|
||||
cancellable,
|
||||
--
|
||||
2.31.1
|
||||
|
@ -11,8 +11,8 @@
|
||||
%global tarball_version %%(echo %{version} | tr '~' '.')
|
||||
|
||||
Name: gnome-software
|
||||
Version: 41~rc
|
||||
Release: 2%{?dist}
|
||||
Version: 41.0
|
||||
Release: 1%{?dist}
|
||||
Summary: A software center for GNOME
|
||||
|
||||
License: GPLv2+
|
||||
@ -20,7 +20,6 @@ URL: https://wiki.gnome.org/Apps/Software
|
||||
Source0: https://download.gnome.org/sources/gnome-software/41/%{name}-%{tarball_version}.tar.xz
|
||||
|
||||
Patch01: 0001-crash-with-broken-theme.patch
|
||||
Patch02: 0002-packagekit-Ensure-PkClient-interactive-flag-being-se.patch
|
||||
|
||||
BuildRequires: appstream-devel >= %{appstream_version}
|
||||
BuildRequires: gcc
|
||||
@ -129,7 +128,11 @@ desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.deskto
|
||||
# set up for Fedora
|
||||
cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschema.override << FOE
|
||||
[org.gnome.software]
|
||||
official-repos = [ 'anaconda', 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-modular', 'fedora-modular-debuginfo', 'fedora-modular-source', 'rawhide-modular', 'rawhide-modular-debuginfo', 'rawhide-modular-source' ]
|
||||
%if 0%{?rhel}
|
||||
official-repos = [ 'rhel-%{?rhel}' ]
|
||||
%else
|
||||
official-repos = [ 'anaconda', 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-modular', 'fedora-modular-debuginfo', 'fedora-modular-source', 'rawhide-modular', 'rawhide-modular-debuginfo', 'rawhide-modular-source', 'fedora-cisco-openh264', 'fedora-cisco-openh264-debuginfo' ]
|
||||
%endif
|
||||
FOE
|
||||
|
||||
%find_lang %name --with-gnome
|
||||
@ -199,6 +202,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
|
||||
%{_datadir}/gtk-doc/html/gnome-software
|
||||
|
||||
%changelog
|
||||
* Mon Sep 20 2021 Milan Crha <mcrha@redhat.com> - 41.0-1
|
||||
- Update to 41.0
|
||||
|
||||
* Mon Sep 13 2021 Milan Crha <mcrha@redhat.com> - 41~rc-2
|
||||
- Resolves: #2003365 (packagekit: Ensure PkClient::interactive flag being set)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (gnome-software-41.rc.tar.xz) = 6aec9a0ffc4957a62f8a25a4ba50b8f7539a701af8813f37310e6372c16b7c9c43ba5d97df05f202339eded5eb45c53bb9480727cfb3053d86ed16e20827cd23
|
||||
SHA512 (gnome-software-41.0.tar.xz) = 6cc090f835e77d64abb0080d3b72494019d6f69c2144abea4dabdc4f52dc570a372159eb1e0b0d98ae33b31c134cc17673fe3fa243eed762eec55620ab146b26
|
||||
|
Loading…
Reference in New Issue
Block a user