[gnome-software/1876-gnome-software-missing-an-install-upgrade-button-when-opening-an-rpm-file] gs-plugin-loaded: Add to an install queue only non-local apps
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1876-gnome-software-missing-an-install-upgrade-button-when-opening-an-rpm-file] gs-plugin-loaded: Add to an install queue only non-local apps
- Date: Thu, 25 Aug 2022 10:44:54 +0000 (UTC)
commit 58e1ba5f8b3ef3aa120e0fc66397495876dc3537
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 25 12:32:42 2022 +0200
gs-plugin-loaded: Add to an install queue only non-local apps
Installing an app from a file (.rpm and such) should not be remembered
in the install queue, because it's a local installation, not remote.
lib/gs-plugin-loader.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index a8810312f..63f741c37 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1084,7 +1084,8 @@ gs_plugin_loader_pending_apps_add (GsPluginLoader *plugin_loader,
GsApp *app = gs_app_list_index (list, i);
switch (gs_plugin_job_get_action (helper->plugin_job)) {
case GS_PLUGIN_ACTION_INSTALL:
- add_app_to_install_queue (plugin_loader, app);
+ if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE_LOCAL)
+ add_app_to_install_queue (plugin_loader, app);
/* make sure the progress is properly initialized */
gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN);
break;
@@ -3500,7 +3501,8 @@ gs_plugin_loader_schedule_task (GsPluginLoader *plugin_loader,
GsPluginAction action = gs_plugin_job_get_action (helper->plugin_job);
gs_app_set_pending_action (app, action);
- if (action == GS_PLUGIN_ACTION_INSTALL)
+ if (action == GS_PLUGIN_ACTION_INSTALL &&
+ gs_app_get_state (app) != GS_APP_STATE_AVAILABLE_LOCAL)
add_app_to_install_queue (plugin_loader, app);
}
g_thread_pool_push (plugin_loader->queued_ops_pool, g_object_ref (task), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]