[gnome-software/wip/kalev/flatpak-eol-runtime-cleanup] flatpak: Use new flatpak API to automatically remove EOL runtimes
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/flatpak-eol-runtime-cleanup] flatpak: Use new flatpak API to automatically remove EOL runtimes
- Date: Thu, 15 Oct 2020 18:28:25 +0000 (UTC)
commit b01c36b7509c336ba628c76e2d08b3f88a63d310
Author: Kalev Lember <klember redhat com>
Date: Thu Oct 15 20:23:24 2020 +0200
flatpak: Use new flatpak API to automatically remove EOL runtimes
When constructing the update transaction, tell flatpak that it can clean
up unused EOL runtimes during the transaction.
We don't have any UI for that, which hopefully should be fine.
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 571f505f..6e47085a 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -961,6 +961,11 @@ gs_plugin_flatpak_update (GsPlugin *plugin,
if (is_update_downloaded)
flatpak_transaction_set_no_pull (transaction, TRUE);
+#if FLATPAK_CHECK_VERSION(1, 9, 1)
+ /* automatically clean up unused EOL runtimes when updating */
+ flatpak_transaction_set_include_unused_uninstall_ops (transaction, TRUE);
+#endif
+
if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
for (guint i = 0; i < gs_app_list_length (list_tmp); i++) {
GsApp *app = gs_app_list_index (list_tmp, i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]