From dc7053970f407943800ccdff7e84f1600de1fc7d Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Mon, 14 May 2018 20:47:56 -0700 Subject: [PATCH] dir: Support finding dependencies offline Currently if you try to do an offline app install from a USB drive and the app requires a runtime that's not already installed (or a different version is installed), the install operation will fail, even if the needed runtime is available on the USB drive. The commit ensures that you can successfully find the dependencies available from peer sources by making flatpak_dir_remote_has_ref() use flatpak_dir_get_remote_state_optional(), which treats a summary fetch error as non-fatal. Due to how flatpak_remote_state_lookup_ref() is written, the summary is still required if there's not a collection ID set on the remote. This is a partial fix for https://github.com/flatpak/flatpak/issues/1583 Closes: #1673 Approved by: pwithnall --- common/flatpak-dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 1c4e3eae..a6c86dcc 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -8456,7 +8456,7 @@ flatpak_dir_remote_has_ref (FlatpakDir *self, g_autoptr(GError) local_error = NULL; g_autoptr(FlatpakRemoteState) state = NULL; - state = flatpak_dir_get_remote_state (self, remote, NULL, &local_error); + state = flatpak_dir_get_remote_state_optional (self, remote, NULL, &local_error); if (state == NULL) { g_debug ("Can't get state for remote %s: %s", remote, local_error->message);