From a9ec35c48ee121e05213c447a3f3e676675a1b5e Mon Sep 17 00:00:00 2001 From: Aleix Pol 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