[gnome-software/wip/flatpak-broken-remotes-table] flatpak: Cleanup broken_remotes hash when flatpak installation changed
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/flatpak-broken-remotes-table] flatpak: Cleanup broken_remotes hash when flatpak installation changed
- Date: Tue, 12 Apr 2022 11:50:33 +0000 (UTC)
commit 4658b2c0ab6b252a3fcde8027178f05954472e4e
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 12 13:48:29 2022 +0200
flatpak: Cleanup broken_remotes hash when flatpak installation changed
When there's notified the flatpak installation changed, it's likely some
of the known broken remotes could have changed as well, thus do not wait
for a plugin refresh() call and cleanup the broken_remotes immediately.
plugins/flatpak/gs-flatpak.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index dd528cc26..71d628035 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -465,6 +465,11 @@ gs_flatpak_claim_changed_idle_cb (gpointer user_data)
g_hash_table_remove_all (self->remote_title);
g_clear_pointer (&locker, g_mutex_locker_free);
+ /* give all the repos a second chance */
+ locker = g_mutex_locker_new (&self->broken_remotes_mutex);
+ g_hash_table_remove_all (self->broken_remotes);
+ g_clear_pointer (&locker, g_mutex_locker_free);
+
writer_locker = g_rw_lock_writer_locker_new (&self->silo_lock);
if (self->silo)
xb_silo_invalidate (self->silo);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]