[gnome-builder] flatpak: Run flatpak-builder in the src dir



commit c3de5733811fde1c20d76d5ad0615030abc0fde4
Author: Matthew Leeds <mleeds redhat com>
Date:   Tue Mar 7 16:19:44 2017 -0600

    flatpak: Run flatpak-builder in the src dir
    
    This commit changes the cwd of the flatpak-builder subprocess so it will
    create the .flatpak-builder/ directory in the project's directory,
    rather than in whatever directory Builder was started from.

 plugins/flatpak/gbp-flatpak-pipeline-addin.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-pipeline-addin.c b/plugins/flatpak/gbp-flatpak-pipeline-addin.c
index 6a9fe2e..6960caa 100644
--- a/plugins/flatpak/gbp-flatpak-pipeline-addin.c
+++ b/plugins/flatpak/gbp-flatpak-pipeline-addin.c
@@ -206,6 +206,7 @@ register_dependencies_stage (GbpFlatpakPipelineAddin  *self,
   IdeConfiguration *config;
   g_autofree gchar *manifest_path = NULL;
   const gchar *primary_module;
+  const gchar *src_dir;
   guint stage_id;
 
   g_assert (GBP_IS_FLATPAK_PIPELINE_ADDIN (self));
@@ -224,9 +225,12 @@ register_dependencies_stage (GbpFlatpakPipelineAddin  *self,
   manifest_path = gbp_flatpak_configuration_get_manifest_path (GBP_FLATPAK_CONFIGURATION (config));
 
   staging_dir = gbp_flatpak_get_staging_dir (config);
+  src_dir = ide_build_pipeline_get_srcdir (pipeline);
 
   launcher = create_subprocess_launcher ();
 
+  ide_subprocess_launcher_set_cwd (launcher, src_dir);
+
   ide_subprocess_launcher_push_argv (launcher, "flatpak-builder");
   ide_subprocess_launcher_push_argv (launcher, "--ccache");
   ide_subprocess_launcher_push_argv (launcher, "--force-clean");


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