[gnome-software] flatpak: Add app to be uninstalled to txn cache
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] flatpak: Add app to be uninstalled to txn cache
- Date: Fri, 12 Jun 2020 15:03:59 +0000 (UTC)
commit ae8f7e34cbc85174310849868f6bc61e6a3154ed
Author: Matthew Leeds <matthew leeds endlessm com>
Date: Fri Feb 21 17:00:29 2020 -0800
flatpak: Add app to be uninstalled to txn cache
This mirrors what we do for install operations, and ensures that the
GsApp object used by the GsFlatpakTransaction will be the same one which
was passed to gs_plugin_app_remove(), which prevents this warning:
(/builds/mwleeds/gnome-software/_build/plugins/flatpak/gs-self-test-flatpak:1689):
Gs-WARNING **: 21:05:06.803: application
user/flatpak/chiron1-origin/desktop/org.test.Chiron/master left in
removing helper
plugins/flatpak/gs-plugin-flatpak.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index e3278b36..ae026d5d 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -602,6 +602,11 @@ gs_plugin_app_remove (GsPlugin *plugin,
gs_flatpak_error_convert (error);
return FALSE;
}
+
+ /* add to the transaction cache for quick look up -- other unrelated
+ * refs will be matched using gs_plugin_flatpak_find_app_by_ref() */
+ gs_flatpak_transaction_add_app (transaction, app);
+
ref = gs_flatpak_app_get_ref_display (app);
if (!flatpak_transaction_add_uninstall (transaction, ref, error)) {
gs_flatpak_error_convert (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]