[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 155/331] Don't change app state on install/remove failure
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 155/331] Don't change app state on install/remove failure
- Date: Wed, 4 May 2016 14:11:33 +0000 (UTC)
commit b540fe44ffc7d5f574415205251a76572d479dd0
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Mar 16 15:29:48 2016 +1300
Don't change app state on install/remove failure
src/plugins/gs-plugin-snappy.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snappy.c b/src/plugins/gs-plugin-snappy.c
index a526a8c..7037b75 100644
--- a/src/plugins/gs-plugin-snappy.c
+++ b/src/plugins/gs-plugin-snappy.c
@@ -459,7 +459,10 @@ gs_plugin_app_install (GsPlugin *plugin,
gs_app_set_state (app, AS_APP_STATE_INSTALLING);
result = send_package_action (plugin, gs_app_get_id (app), "install", error);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ if (result)
+ gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ else
+ gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
return result;
}
@@ -478,7 +481,10 @@ gs_plugin_app_remove (GsPlugin *plugin,
gs_app_set_state (app, AS_APP_STATE_REMOVING);
result = send_package_action (plugin, gs_app_get_id (app), "remove", error);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ if (result)
+ gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ else
+ gs_app_set_state (app, AS_APP_STATE_INSTALLED);
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]