From 6e7bad4b6a9ff8b8f16bb15267c5a71c981152a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= Date: Fri, 21 Oct 2022 14:26:24 +0200 Subject: [PATCH] gs-plugin-apk: rollback proxy apps in case of failures --- src/gs-plugin-apk/gs-plugin-apk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gs-plugin-apk/gs-plugin-apk.c b/src/gs-plugin-apk/gs-plugin-apk.c index ce28122..cb12be0 100644 --- a/src/gs-plugin-apk/gs-plugin-apk.c +++ b/src/gs-plugin-apk/gs-plugin-apk.c @@ -512,7 +512,15 @@ gs_plugin_update (GsPlugin *plugin, GsApp *app = gs_app_list_index (update_list, i); gs_app_set_state_recover (app); } - /*gs_app_set_state_recover (app); TODO: Fix this! */ + + /* Roll-back apps from the original list with a quirk */ + for (int i = 0; i < gs_app_list_length (list); i++) + { + GsApp *app = gs_app_list_index (list, i); + if (gs_app_has_quirk (app, GS_APP_QUIRK_IS_PROXY)) + gs_app_set_state_recover (app); + } + return FALSE; }