summaryrefslogtreecommitdiff
blob: e457401028c0d359eb8dc5bbc3ba8110005b6f37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From a9ec35c48ee121e05213c447a3f3e676675a1b5e Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Sat, 25 May 2024 01:17:35 +0200
Subject: [PATCH] flatpak: Allow building with flatpaks older than 1.15

It's still fresh and not even considered stable
---
 .../backends/FlatpakBackend/FlatpakTransactionThread.cpp     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
index 4211f30a38..7749187c7d 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
+++ b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
@@ -393,6 +393,7 @@ bool FlatpakTransactionThread::end_of_lifed_with_rebase(const char *remote,
                                                         const char *rebased_to_ref,
                                                         const char **previous_ids)
 {
+#if FLATPAK_CHECK_VERSION(1, 15, 0)
     QMutexLocker lock(&m_proceedMutex);
 
     if (QString::fromUtf8(rebased_to_ref).startsWith("runtime/"_L1)) {
@@ -421,6 +422,10 @@ bool FlatpakTransactionThread::end_of_lifed_with_rebase(const char *remote,
         return false;
     }
     return m_proceed;
+#else
+    Q_EMIT passiveMessage(i18n("Could not update %1, %2", QString::fromLatin1(ref), QString::fromLatin1(reason)));
+    return false;
+#endif
 }
 
 void FlatpakTransactionThread::proceed()
-- 
GitLab