[gnome-builder/wip/chergert/flatpak-repo] flatpak: allow updating from peer when locating ref



commit bd54c911789435bb64bf6c02641012b66afa656b
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 24 14:28:16 2021 -0700

    flatpak: allow updating from peer when locating ref
    
    Otherwise we risk not actually able to resolve SDKs.

 src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c 
b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
index 6e392f163..4252c6353 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -834,15 +834,15 @@ find_remote_for_ref (IpcFlatpakServiceImpl  *self,
   g_assert (IPC_IS_FLATPAK_SERVICE_IMPL (self));
   g_assert (FLATPAK_IS_REF (ref));
 
+#if FLATPAK_CHECK_VERSION(1, 11, 2)
   /* If this is not the default architecture, we need to force that we've
    * loaded sub-summaries or we won't find any matches for the arch. Otherwise
    * the cached form is fine (and faster).
    */
-  if (str_equal0 (flatpak_get_default_arch (), flatpak_ref_get_arch (ref)))
-    flags |= FLATPAK_QUERY_FLAGS_ONLY_CACHED;
-#if FLATPAK_CHECK_VERSION(1, 11, 2)
-  else
+  if (!str_equal0 (flatpak_get_default_arch (), flatpak_ref_get_arch (ref)))
     flags |= FLATPAK_QUERY_FLAGS_ALL_ARCHES;
+#else
+# warning "Flatpak is too old, searching for alternate arches will not work"
 #endif
 
   /* Someday we might want to prompt the user for which remote to install from,


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