[system/partitionmanager/release/26.08] /: Be a tiny bit more lenient with KPMcore versions
Heiko Becker <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 34515e478c68dc8b7e53b7b9a36994eb6bb4d91a by Heiko Becker.
Committed on 13/08/2026 at 19:36.
Pushed by heikobecker into branch 'release/26.08'.
Be a tiny bit more lenient with KPMcore versions
The code comment also contains the motivation, but I add here that
it's an issue with CI I ran into when updating Gear versions after [1].
There was no longer a build of kpmcore with the new version and thus
partitionmanager failed to build.
[1] https://invent.kde.org/sysadmin/release-tools/-/merge_requests/73
(cherry picked from commit 7db5dbc5f1c99f9f339f01e6518a16cf84d2b4a9)
M +9 -1 CMakeLists.txt
https://invent.kde.org/system/partitionmanager/-/commit/34515e478c68dc8b7e53b7b9a36994eb6bb4d91a
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59203443..3127c33e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,15 @@ project(partitionmanager VERSION ${RELEASE_SERVICE_VERSION})
# Dependencies
set(QT_MIN_VERSION "6.5.0")
set(KF_MIN_VERSION "6.17.0")
-set(KPMCORE_MIN_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}")
+# The intention here is to depend on a release from at least the same release
+# branch and to accomodate the jump from a RC version to .0 (eg. 26.07.90 to
+# 26.08.0), where we shouldn't really add breaking changes anyway.
+math(EXPR KPMCORE_RELEASE_BRANCH_VERSION "${RELEASE_SERVICE_VERSION_MINOR} - (${RELEASE_SERVICE_VERSION_MINOR} -3) % 4")
+if(KPMCORE_RELEASE_BRANCH_VERSION LESS "10")
+ string(PREPEND KPMCORE_RELEASE_BRANCH_VERSION "0") # pad with 0
+endif()
+
+set(KPMCORE_MIN_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${KPMCORE_RELEASE_BRANCH_VERSION}")
set(KDE_COMPILERSETTINGS_LEVEL "5.85")