[gnome-builder] flatpak: get arch from pipeline



commit e25342ce5f3c657cecbaabefb0209e2b67d91a7a
Author: Christian Hergert <chergert redhat com>
Date:   Thu Feb 21 15:55:28 2019 -0800

    flatpak: get arch from pipeline

 src/plugins/flatpak/gbp-flatpak-pipeline-addin.c | 4 +---
 src/plugins/flatpak/gbp-flatpak-util.c           | 6 +++---
 src/plugins/flatpak/gbp-flatpak-util.h           | 2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c 
b/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
index a81ebac19..aff275be4 100644
--- a/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
+++ b/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
@@ -67,12 +67,10 @@ static gchar *
 get_arch_option (IdePipeline *pipeline)
 {
   g_autofree gchar *arch = NULL;
-  IdeRuntime *runtime;
 
   g_assert (IDE_IS_PIPELINE (pipeline));
 
-  runtime = ide_pipeline_get_runtime (pipeline);
-  arch = ide_runtime_get_arch (runtime);
+  arch = ide_pipeline_get_arch (pipeline);
 
   return g_strdup_printf ("--arch=%s", arch);
 }
diff --git a/src/plugins/flatpak/gbp-flatpak-util.c b/src/plugins/flatpak/gbp-flatpak-util.c
index 0e030dbfe..ffee1fee4 100644
--- a/src/plugins/flatpak/gbp-flatpak-util.c
+++ b/src/plugins/flatpak/gbp-flatpak-util.c
@@ -38,6 +38,7 @@ gbp_flatpak_get_staging_dir (IdePipeline *pipeline)
 {
   g_autofree gchar *branch = NULL;
   g_autofree gchar *name = NULL;
+  g_autofree gchar *arch = NULL;
   g_autoptr (IdeTriplet) triplet = NULL;
   g_autoptr(IdeContext) context = NULL;
   g_autoptr(IdeVcs) vcs = NULL;
@@ -48,9 +49,8 @@ gbp_flatpak_get_staging_dir (IdePipeline *pipeline)
   context = ide_object_ref_context (IDE_OBJECT (pipeline));
   vcs = ide_vcs_ref_from_context (context);
   branch = ide_vcs_get_branch_name (vcs);
-  toolchain = ide_pipeline_ref_toolchain (pipeline);
-  triplet = ide_toolchain_get_host_triplet (toolchain);
-  name = g_strdup_printf ("%s-%s", ide_triplet_get_arch (triplet), branch);
+  arch = ide_pipeline_get_arch (pipeline);
+  name = g_strdup_printf ("%s-%s", arch, branch);
 
   g_strdelimit (name, G_DIR_SEPARATOR_S, '-');
 
diff --git a/src/plugins/flatpak/gbp-flatpak-util.h b/src/plugins/flatpak/gbp-flatpak-util.h
index 8cbfab717..c56b13676 100644
--- a/src/plugins/flatpak/gbp-flatpak-util.h
+++ b/src/plugins/flatpak/gbp-flatpak-util.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
 
 gboolean  gbp_flatpak_is_ignored      (const gchar       *name);
 gchar    *gbp_flatpak_get_repo_dir    (IdeContext        *context);
-gchar    *gbp_flatpak_get_staging_dir (IdePipeline  *pipeline);
+gchar    *gbp_flatpak_get_staging_dir (IdePipeline       *pipeline);
 gboolean  gbp_flatpak_split_id        (const gchar       *str,
                                        gchar            **id,
                                        gchar            **arch,


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