File 0006-transaction-Install-an-extensions-required-runtime.patch of Package flatpak.14328

From f7463733dac0d1115e49428b938d401e19427462 Mon Sep 17 00:00:00 2001
From: Ryan Gonzalez <rymg19@gmail.com>
Date: Mon, 10 Jun 2019 20:11:42 +0000
Subject: [PATCH] transaction: Install an extension's required runtime

Closes: #2954
Approved by: alexlarsson

(cherry picked from commit c87c480a18e6a112e49c639f7b5a818135ef1e68)

Closes: #2992
Approved by: alexlarsson

(cherry picked from commit 1ca31146d367f0d08cddd083677503b5cafbc6e4)

Closes: #3115
Approved by: alexlarsson
---
 common/flatpak-transaction.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/flatpak-transaction.c b/common/flatpak-transaction.c
index e84860b5c..ba483f135 100644
--- a/common/flatpak-transaction.c
+++ b/common/flatpak-transaction.c
@@ -1581,11 +1581,13 @@ add_deps (FlatpakTransaction          *self,
   g_autofree char *runtime_remote = NULL;
   FlatpakTransactionOperation *runtime_op = NULL;
 
-  if (!g_str_has_prefix (op->ref, "app/"))
+  if (!op->resolved_metakey)
     return TRUE;
 
-  if (op->resolved_metakey)
+  if (g_str_has_prefix (op->ref, "app/"))
     runtime_ref = g_key_file_get_string (op->resolved_metakey, "Application", "runtime", NULL);
+  else
+    runtime_ref = g_key_file_get_string (op->resolved_metakey, "ExtensionOf", "runtime", NULL);
 
   if (runtime_ref == NULL)
     return TRUE;
openSUSE Build Service is sponsored by