[gnome-software] Whitelist the plugin actions that are required for proper operation
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Whitelist the plugin actions that are required for proper operation
- Date: Thu, 1 Jun 2017 11:46:19 +0000 (UTC)
commit 927352e9ab6d5312b262479ff78f563678a59501
Author: Richard Hughes <richard hughsie com>
Date: Thu Jun 1 12:46:00 2017 +0100
Whitelist the plugin actions that are required for proper operation
lib/gs-plugin-loader.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 07664f6..b151a3b 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3106,8 +3106,19 @@ gs_plugin_loader_process_thread_cb (GTask *task,
}
}
- /* nothing ran */
- if (action != GS_PLUGIN_ACTION_REFINE) {
+ /* some functions are really required for proper operation */
+ switch (action) {
+ case GS_PLUGIN_ACTION_DESTROY:
+ case GS_PLUGIN_ACTION_GET_INSTALLED:
+ case GS_PLUGIN_ACTION_GET_UPDATES:
+ case GS_PLUGIN_ACTION_INITIALIZE:
+ case GS_PLUGIN_ACTION_INSTALL:
+ case GS_PLUGIN_ACTION_LAUNCH:
+ case GS_PLUGIN_ACTION_REFRESH:
+ case GS_PLUGIN_ACTION_REMOVE:
+ case GS_PLUGIN_ACTION_SEARCH:
+ case GS_PLUGIN_ACTION_SETUP:
+ case GS_PLUGIN_ACTION_UPDATE:
if (!helper->anything_ran) {
g_set_error (&error,
GS_PLUGIN_ERROR,
@@ -3117,6 +3128,13 @@ gs_plugin_loader_process_thread_cb (GTask *task,
g_task_return_error (task, error);
return;
}
+ break;
+ default:
+ if (!helper->anything_ran) {
+ g_debug ("no plugin could handle %s",
+ gs_plugin_action_to_string (action));
+ }
+ break;
}
/* unstage addons */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]