[gnome-builder/wip/chergert/flatpak-repo: 15/29] flatpak: give access to FLATPAK_CONFIG_DIR




commit f34aa66c856975cbad7d2797af1a2490a9f38f28
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 24 16:53:44 2021 -0700

    flatpak: give access to FLATPAK_CONFIG_DIR
    
    We need this to be able to access the private installation.

 src/plugins/flatpak/gbp-flatpak-pipeline-addin.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c 
b/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
index cf75dca60..cdea40130 100644
--- a/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
+++ b/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
@@ -146,12 +146,17 @@ always_run_query_handler (IdePipelineStage *stage,
 static IdeSubprocessLauncher *
 create_subprocess_launcher (void)
 {
+  static char *config_dir;
   IdeSubprocessLauncher *launcher;
 
+  if (config_dir == NULL)
+    config_dir = g_build_filename (g_get_user_data_dir (), "gnome-builder", "flatpak", "etc", NULL);
+
   launcher = ide_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
                                           G_SUBPROCESS_FLAGS_STDERR_PIPE);
   ide_subprocess_launcher_set_run_on_host (launcher, TRUE);
   ide_subprocess_launcher_set_clear_env (launcher, FALSE);
+  ide_subprocess_launcher_setenv (launcher, "FLATPAK_CONFIG_DIR", config_dir, TRUE);
 
   return launcher;
 }


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