diff options
author | gasinvein <gasinvein@gmail.com> | 2021-10-21 00:05:23 +0300 |
---|---|---|
committer | gasinvein <gasinvein@gmail.com> | 2021-10-21 13:03:45 +0300 |
commit | 30964d2baccc03873c2bdbd7b74db919d62d576f (patch) | |
tree | a41744d5eadde86cedafb31194cf77b411029235 | |
parent | 14b375e09aaf1f015581fb37b4f1d152668bf769 (diff) | |
download | flatpak-30964d2baccc03873c2bdbd7b74db919d62d576f.tar.gz |
build-init: Use SDK arch for SDK extensions...
...instead of the app we're building arch.
-rw-r--r-- | app/flatpak-builtins-build-init.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/flatpak-builtins-build-init.c b/app/flatpak-builtins-build-init.c index c0f2acf4..1d5c9bf9 100644 --- a/app/flatpak-builtins-build-init.c +++ b/app/flatpak-builtins-build-init.c @@ -67,7 +67,7 @@ static GOptionEntry options[] = { }; static gboolean -ensure_extensions (FlatpakDeploy *src_deploy, const char *default_branch, +ensure_extensions (FlatpakDeploy *src_deploy, const char *default_arch, const char *default_branch, char *src_extensions[], GFile *top_dir, GCancellable *cancellable, GError **error) { g_autoptr(GKeyFile) metakey = flatpak_deploy_get_metadata (src_deploy); @@ -75,7 +75,7 @@ ensure_extensions (FlatpakDeploy *src_deploy, const char *default_branch, int i; /* We leak this on failure, as we have no autoptr for deep lists.. */ - extensions = flatpak_list_extensions (metakey, opt_arch, default_branch); + extensions = flatpak_list_extensions (metakey, default_arch, default_branch); for (i = 0; src_extensions[i] != NULL; i++) { @@ -182,6 +182,7 @@ flatpak_builtin_build_init (int argc, char **argv, GCancellable *cancellable, GE const char *runtime_pref; const char *default_branch = NULL; g_autofree char *sdk_branch = NULL; + g_autofree char *sdk_arch = NULL; g_autofree char *base_ref = NULL; g_autoptr(FlatpakDecomposed) runtime_ref = NULL; g_autofree char *extension_runtime_pref = NULL; @@ -317,9 +318,10 @@ flatpak_builtin_build_init (int argc, char **argv, GCancellable *cancellable, GE } sdk_branch = flatpak_decomposed_dup_branch (sdk_ref); + sdk_arch = flatpak_decomposed_dup_arch (sdk_ref); if (opt_sdk_extensions && - !ensure_extensions (sdk_deploy, sdk_branch, + !ensure_extensions (sdk_deploy, sdk_arch, sdk_branch, opt_sdk_extensions, usr_dir, cancellable, error)) return FALSE; @@ -360,7 +362,8 @@ flatpak_builtin_build_init (int argc, char **argv, GCancellable *cancellable, GE if (opt_base_extensions && - !ensure_extensions (base_deploy, base_branch, opt_base_extensions, files_dir, cancellable, error)) + !ensure_extensions (base_deploy, opt_arch, base_branch, + opt_base_extensions, files_dir, cancellable, error)) return FALSE; } |