[gnome-builder] podman: fix showing available containers in build config
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] podman: fix showing available containers in build config
- Date: Wed, 24 Feb 2021 03:27:29 +0000 (UTC)
commit 7de455e71390adbb2a740540e1cfc2c54df1ba85
Author: peter <blackwolf12333 gmail com>
Date: Tue Feb 23 17:34:35 2021 +0100
podman: fix showing available containers in build config
src/plugins/podman/gbp-podman-runtime-provider.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/podman/gbp-podman-runtime-provider.c
b/src/plugins/podman/gbp-podman-runtime-provider.c
index 6d04f5efb..61f9b494a 100644
--- a/src/plugins/podman/gbp-podman-runtime-provider.c
+++ b/src/plugins/podman/gbp-podman-runtime-provider.c
@@ -264,6 +264,22 @@ gbp_podman_runtime_provider_load (IdeRuntimeProvider *provider,
self->cancellable = g_cancellable_new ();
self->manager = manager;
+ /**
+ * We attempt to initialize the podman provider asynchronously even if podman
+ * is not configured as the runtime provider in the build configuration. This is
+ * to make sure we show available runtimes in the configuration surface.
+ *
+ * If podman is selected as the provider for the runtime used in the build
+ * configuration the _provides method will ensure that the runtime is loaded
+ * before the pipeline is marked as active.
+ *
+ * TODO: we can probably let the bootstrap process continue with this async load
+ * when that load is not done yet before the pipeline wants us to be ready.
+ */
+ gbp_podman_runtime_provider_load_async (self,
+ self->cancellable,
+ NULL, NULL);
+
IDE_EXIT;
}
@@ -289,7 +305,7 @@ gbp_podman_runtime_provider_unload (IdeRuntimeProvider *provider,
static gboolean
gbp_podman_runtime_provider_provides (IdeRuntimeProvider *provider,
- const gchar *runtime_id)
+ const gchar *runtime_id)
{
IDE_ENTRY;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]