[gnome-builder/gnome-builder-3-24] flatpak: tweak PATH in flatpak subprocess launcher



commit d5e6163ba8102a707b37b6134233c97ec60aff5f
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 29 13:58:51 2017 -0700

    flatpak: tweak PATH in flatpak subprocess launcher
    
    This should be more similar to the path that Flatpak uses automatically.
    It fixes some issues with gdbus-codegen not running properly due to
    improper relative path access.
    
    flatpak run org.gnome.Sdk was used to see what the default $PATH should
    be and this matches it.

 plugins/flatpak/gbp-flatpak-subprocess-launcher.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-subprocess-launcher.c 
b/plugins/flatpak/gbp-flatpak-subprocess-launcher.c
index 7d0d584..842350c 100644
--- a/plugins/flatpak/gbp-flatpak-subprocess-launcher.c
+++ b/plugins/flatpak/gbp-flatpak-subprocess-launcher.c
@@ -41,11 +41,13 @@ gbp_flatpak_subprocess_launcher_spawn (IdeSubprocessLauncher  *launcher,
   g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
 
   /*
-   * Don't allow PATH to be set when traversing "flatpak build" from the default
-   * IdeSubprocessLauncher. We need to ensure that /app/bin is available.
+   * Don't allow PATH to be set when traversing "flatpak build" from the
+   * default IdeSubprocessLauncher. We need to ensure that /app/bin is before
+   * /usr/bin so that we are similar to "flatpak run org.gnome.Sdk" and that
+   * the developers tooling can override /usr/.
    */
   if (ide_subprocess_launcher_get_clear_env (launcher))
-    ide_subprocess_launcher_setenv (launcher, "PATH", "/app/bin:/bin:/usr/bin", TRUE);
+    ide_subprocess_launcher_setenv (launcher, "PATH", "/app/bin:/usr/bin", TRUE);
 
   /*
    * The "flatpak build" command will filter out all of our environment variables


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