[gnome-builder] flatpak: make ALL_ARCHES usage optional



commit 3ac3e89365a9e6a38087ae41f838bfff3717ac69
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 21 08:54:05 2021 -0700

    flatpak: make ALL_ARCHES usage optional
    
    We require 1.11.2, which we don't have in gnome-build-meta.

 src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c | 6 ++++++
 src/plugins/flatpak/daemon/meson.build                | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c 
b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
index 788c3df75..8319ded19 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -509,8 +509,10 @@ is_known_worker (GTask        *task,
 
   if (str_equal0 (ref_arch, flatpak_get_default_arch ()))
     flags |= FLATPAK_QUERY_FLAGS_ONLY_CACHED;
+#if FLATPAK_CHECK_VERSION(1, 11, 2)
   else
     flags |= FLATPAK_QUERY_FLAGS_ALL_ARCHES;
+#endif
 
   for (guint z = 0; z < state->installs->len; z++)
     {
@@ -821,8 +823,10 @@ find_remote_for_ref (IpcFlatpakServiceImpl *self,
    */
   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
     flags |= FLATPAK_QUERY_FLAGS_ALL_ARCHES;
+#endif
 
   /* Someday we might want to prompt the user for which remote to install from,
    * but for now we'll just take the first.
@@ -1004,8 +1008,10 @@ resolve_extension (GPtrArray  *installations,
 
   if (str_equal0 (sdk_arch, flatpak_get_default_arch ()))
     flags |= FLATPAK_QUERY_FLAGS_ONLY_CACHED;
+#if FLATPAK_CHECK_VERSION(1, 11, 2)
   else
     flags |= FLATPAK_QUERY_FLAGS_ALL_ARCHES;
+#endif
 
   strings = g_string_chunk_new (4096);
   maybe_extention_of = g_array_new (FALSE, FALSE, sizeof (ResolveExtension));
diff --git a/src/plugins/flatpak/daemon/meson.build b/src/plugins/flatpak/daemon/meson.build
index 4fe155ad5..de404566d 100644
--- a/src/plugins/flatpak/daemon/meson.build
+++ b/src/plugins/flatpak/daemon/meson.build
@@ -1,4 +1,4 @@
-libflatpak_dep = dependency('flatpak', version: '>= 1.11.2')
+libflatpak_dep = dependency('flatpak', version: '>= 1.10.2')
 
 gnome_builder_flatpak_deps = [
   libgiounix_dep,


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