[gnome-builder/gnome-builder-3-26] flatpak: pass --command to flatpak build-finish



commit e0a43deea99519bcdc5c45791071316a4e89ba39
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 19 16:18:48 2018 -0800

    flatpak: pass --command to flatpak build-finish
    
    Backported from #353

 plugins/flatpak/gbp-flatpak-pipeline-addin.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-pipeline-addin.c b/plugins/flatpak/gbp-flatpak-pipeline-addin.c
index acfb8a55e..7f25e6ab4 100644
--- a/plugins/flatpak/gbp-flatpak-pipeline-addin.c
+++ b/plugins/flatpak/gbp-flatpak-pipeline-addin.c
@@ -369,7 +369,8 @@ register_build_finish_stage (GbpFlatpakPipelineAddin  *self,
   g_autoptr(IdeSubprocessLauncher) launcher = NULL;
   g_autoptr(IdeBuildStage) stage = NULL;
   g_autofree gchar *staging_dir = NULL;
-  const gchar *const *finish_args;
+  const gchar * const *finish_args;
+  const gchar *command;
   IdeConfiguration *config;
   guint stage_id;
 
@@ -381,6 +382,7 @@ register_build_finish_stage (GbpFlatpakPipelineAddin  *self,
   if (!GBP_IS_FLATPAK_CONFIGURATION (config))
     return TRUE;
 
+  command = gbp_flatpak_configuration_get_command (GBP_FLATPAK_CONFIGURATION (config));
   finish_args = gbp_flatpak_configuration_get_finish_args (GBP_FLATPAK_CONFIGURATION (config));
   staging_dir = gbp_flatpak_get_staging_dir (config);
 
@@ -388,6 +390,13 @@ register_build_finish_stage (GbpFlatpakPipelineAddin  *self,
 
   ide_subprocess_launcher_push_argv (launcher, "flatpak");
   ide_subprocess_launcher_push_argv (launcher, "build-finish");
+
+  if (command != NULL)
+    {
+      ide_subprocess_launcher_push_argv (launcher, "--command");
+      ide_subprocess_launcher_push_argv (launcher, command);
+    }
+
   ide_subprocess_launcher_push_args (launcher, finish_args);
   ide_subprocess_launcher_push_argv (launcher, staging_dir);
 


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