[gnome-builder] flatpak: Don't install the same runtime twice
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: Don't install the same runtime twice
- Date: Sat, 8 Apr 2017 18:14:51 +0000 (UTC)
commit eae82feab0e1387f4755fcafe91d62a63260a79b
Author: Matthew Leeds <mwl458 gmail com>
Date: Sat Apr 8 12:53:35 2017 -0500
flatpak: Don't install the same runtime twice
When a project's runtime is the Sdk rather than Platform, the companion
sdk will be the same runtime, so there's no need to start two separate
install processes.
https://bugzilla.gnome.org/show_bug.cgi?id=781004
plugins/flatpak/gbp-flatpak-runtime-provider.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-runtime-provider.c b/plugins/flatpak/gbp-flatpak-runtime-provider.c
index 1bcc5e1..0f41f29 100644
--- a/plugins/flatpak/gbp-flatpak-runtime-provider.c
+++ b/plugins/flatpak/gbp-flatpak-runtime-provider.c
@@ -264,6 +264,7 @@ gbp_flatpak_runtime_provider_locate_sdk_cb (GObject *object,
InstallRuntime *install;
GCancellable *cancellable;
IdeContext *context;
+ gboolean sdk_matches_runtime = FALSE;
IDE_ENTRY;
@@ -317,7 +318,11 @@ gbp_flatpak_runtime_provider_locate_sdk_cb (GObject *object,
g_object_ref (task));
}
- if (gbp_flatpak_application_addin_has_runtime (app_addin,
+ sdk_matches_runtime = (g_strcmp0 (install->sdk_id, install->id) == 0 &&
+ g_strcmp0 (install->sdk_arch, install->arch) == 0 &&
+ g_strcmp0 (install->sdk_branch, install->branch) == 0);
+ if (sdk_matches_runtime ||
+ gbp_flatpak_application_addin_has_runtime (app_addin,
install->sdk_id,
install->sdk_arch,
install->sdk_branch))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]