[gnome-builder] runtime-manager: always try to install runtimes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] runtime-manager: always try to install runtimes
- Date: Thu, 16 Feb 2017 05:08:06 +0000 (UTC)
commit 093114421e24acbeaa4f76f012091e1a45f7e156
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 15 21:01:30 2017 -0800
runtime-manager: always try to install runtimes
We might have a runtime but be missing an SDK, so this lets us ensure
that it gets installed.
libide/runtimes/ide-runtime-manager.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/libide/runtimes/ide-runtime-manager.c b/libide/runtimes/ide-runtime-manager.c
index 4723b39..d925f20 100644
--- a/libide/runtimes/ide-runtime-manager.c
+++ b/libide/runtimes/ide-runtime-manager.c
@@ -350,7 +350,6 @@ ide_runtime_manager_ensure_async (IdeRuntimeManager *self,
gpointer user_data)
{
g_autoptr(GTask) task = NULL;
- IdeRuntime *runtime;
InstallLookup lookup = {
.runtime_id = runtime_id,
.provider = NULL
@@ -366,13 +365,11 @@ ide_runtime_manager_ensure_async (IdeRuntimeManager *self,
g_task_set_source_tag (task, ide_runtime_manager_ensure_async);
g_task_set_task_data (task, g_strdup (runtime_id), g_free);
- runtime = ide_runtime_manager_get_runtime (self, runtime_id);
-
- if (runtime != NULL)
- {
- g_task_return_pointer (task, g_object_ref (runtime), g_object_unref);
- IDE_EXIT;
- }
+ /*
+ * It would be tempting to just return early here if we could locate
+ * the runtime as already registered. But that isn't enough since we
+ * might need to also install an SDK.
+ */
peas_extension_set_foreach (self->extensions,
(PeasExtensionSetForeachFunc) install_lookup_cb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]