[gnome-builder/gnome-builder-41] flatpak: ignore runtimes on system installation



commit 2d28e2b6569179d25775958fcbd558b1a246f40b
Author: Christian Hergert <chergert redhat com>
Date:   Tue Nov 16 15:27:09 2021 -0800

    flatpak: ignore runtimes on system installation
    
    If the runtime is on the system installation, we don't want to resolve an
    installation request using that. Instead we want to fallback to either the
    user or private installation.

 src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c | 6 +++++-
 1 file changed, 5 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 0b56a2d15..e5b832966 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -963,9 +963,13 @@ find_installations_for_refs (IpcFlatpakServiceImpl *self,
         {
           const Runtime *r = g_ptr_array_index (self->runtimes, j);
 
+          /* Check for matching ref, but also that installation is going
+           * to be writable to us from the sandbox.
+           */
           if (str_equal0 (name, r->name) &&
               str_equal0 (arch, r->arch) &&
-              str_equal0 (branch, r->branch))
+              str_equal0 (branch, r->branch) &&
+              flatpak_installation_get_is_user (r->installation))
             {
               g_ptr_array_add (installations, g_object_ref (r->installation));
               continue;


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