[gnome-builder] plugins/flatpak: always provide --share=network for builds
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/flatpak: always provide --share=network for builds
- Date: Tue, 6 Sep 2022 19:50:17 +0000 (UTC)
commit 39d4d4364272754b81e819dee8909618bd49a45e
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 6 12:50:12 2022 -0700
plugins/flatpak: always provide --share=network for builds
Workaround until we can rearchitect our Flatpak support into something more
viable with regards to flatpak-builder equivalence.
Fixes #1775
src/plugins/flatpak/gbp-flatpak-runtime.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime.c b/src/plugins/flatpak/gbp-flatpak-runtime.c
index dc53537e9..86f1bb72a 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime.c
@@ -390,13 +390,18 @@ gbp_flatpak_runtime_handle_build_context_cb (IdeRunContext *run_context,
if (build_args != NULL)
ide_run_context_append_args (run_context, build_args);
}
- else
- {
- /* Somehow got here w/o a manifest, give network access to be nice so
- * things like meson subprojects work and git submodules work.
- */
- ide_run_context_append_argv (run_context, "--share=network");
- }
+
+ /* Always include `--share=network` because incremental building tends
+ * to be different than one-shot building for a Flatpak build as developers
+ * are likely to not have all the deps fetched via submodules they just
+ * changed or even additional sources within the app's manifest module.
+ *
+ * See https://gitlab.gnome.org/GNOME/gnome-builder/-/issues/1775 for
+ * more information. Having flatpak-builder as a library could allow us
+ * to not require these sorts of workarounds.
+ */
+ if (!g_strv_contains (ide_run_context_get_argv (run_context), "--share=network"))
+ ide_run_context_append_argv (run_context, "--share=network");
/* Prepare an alternate PATH */
if (!(path = g_environ_getenv ((char **)env, "PATH")))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]