[gnome-builder] flatpak: change sdk extension to build arch



commit 5b3ef918c84ca060325147bb8dcf633044dbb503
Author: Christian Hergert <chergert redhat com>
Date:   Fri Apr 30 20:58:54 2021 -0700

    flatpak: change sdk extension to build arch
    
    As it will match the host system now from the manifest.

 src/plugins/flatpak/gbp-flatpak-runtime-provider.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime-provider.c 
b/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
index acc506421..e14d2e8a3 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
@@ -823,9 +823,18 @@ gbp_flatpak_runtime_provider_bootstrap_async (IdeRuntimeProvider  *provider,
               g_autofree char *resolved_arch = NULL;
               g_autofree char *resolved_branch = NULL;
 
+              /* Ignore the arch from the sdk_extension (it will be the host) and use the
+               * arch from the configuration instead.
+               */
               if (gbp_flatpak_split_id (sdk_extension, &resolved_id, &resolved_arch, &resolved_branch) &&
-                  !gbp_flatpak_application_addin_has_runtime (addin, resolved_id, resolved_arch, 
resolved_branch))
-                gbp_flatpak_install_dialog_add_runtime (dialog, sdk_extension);
+                  !gbp_flatpak_application_addin_has_runtime (addin, resolved_id, state->arch, 
resolved_branch))
+                {
+                  g_autofree char *for_arch = g_strdup_printf ("%s/%s/%s",
+                                                               resolved_id,
+                                                               state->arch,
+                                                               resolved_branch ? resolved_branch : "");
+                  gbp_flatpak_install_dialog_add_runtime (dialog, for_arch);
+                }
             }
         }
     }


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