[gnome-builder/wip/gtk4-port] plugins/flatpak: give flatpak-build access to minimal environment



commit a3adadb1c0f3a8a1ff735c749bcdc39ce6e1349d
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 24 04:47:46 2022 -0700

    plugins/flatpak: give flatpak-build access to minimal environment
    
    Otherwise, it won't setup various things for us in the app context. This
    isn't required everywhere, so the environment is set again at a higher
    level from here when running.
    
    We only set this in the "flatpak build" environment for *running* because
    we don't want it available in builds since flatpak-builder wouldn't have
    access to that either.

 src/plugins/flatpak/gbp-flatpak-runtime.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime.c b/src/plugins/flatpak/gbp-flatpak-runtime.c
index bbc6f4e09..734f9a18e 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime.c
@@ -375,6 +375,11 @@ gbp_flatpak_runtime_handle_run_context_cb (IdeRunContext       *run_context,
   /* Make sure our worker has access to our Builder-specific Flatpak repository */
   ide_run_context_setenv (run_context, "FLATPAK_CONFIG_DIR", gbp_flatpak_get_config_dir ());
 
+  /* We need access to a few things for "flatpak build" to work and give us
+   * access to the display/etc.
+   */
+  ide_run_context_add_minimal_environment (run_context);
+
   /* We can pass the CWD directory down just fine */
   ide_run_context_set_cwd (run_context, cwd);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]