diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2021-06-14 17:14:24 +0100 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2021-06-16 17:59:45 +0200 |
commit | 879b632c581f5094efabb03849305748b24e4aee (patch) | |
tree | 6addf70eea31eeeeddeffa93a3e67da957b59cf9 | |
parent | a7af60f498f3a7641e1cb43aa37e058d5c17774a (diff) | |
download | flatpak-879b632c581f5094efabb03849305748b24e4aee.tar.gz |
flatpak-transaction: Fix finding runtime with non-default remote+arch
Fix an “The application foo requires the runtime bla which was not
found” error when using libflatpak (not the CLI) to install an
application whose runtime is provided by a different repo, and which is
for a non-default architecture.
This is a follow-up to commit f2ff664ff.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r-- | common/flatpak-transaction.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/flatpak-transaction.c b/common/flatpak-transaction.c index a6bf4d60..7f20681f 100644 --- a/common/flatpak-transaction.c +++ b/common/flatpak-transaction.c @@ -2189,6 +2189,7 @@ search_for_dependency (FlatpakTransaction *self, { g_autoptr(GPtrArray) found = g_ptr_array_new_with_free_func (g_free); int i; + g_autofree char *arch = flatpak_decomposed_dup_arch (runtime_ref); for (i = 0; remotes != NULL && remotes[i] != NULL; i++) { @@ -2196,7 +2197,7 @@ search_for_dependency (FlatpakTransaction *self, g_autoptr(GError) local_error = NULL; g_autoptr(FlatpakRemoteState) state = NULL; - state = flatpak_transaction_ensure_remote_state (self, FLATPAK_TRANSACTION_OPERATION_INSTALL, remote, NULL, &local_error); + state = flatpak_transaction_ensure_remote_state (self, FLATPAK_TRANSACTION_OPERATION_INSTALL, remote, arch, &local_error); if (state == NULL) { g_debug ("Can't get state for remote %s, ignoring: %s", remote, local_error->message); |